You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
418 B
JavaScript
14 lines
418 B
JavaScript
"use strict";
|
|
|
|
const wrapError = require("@validatem/wrap-error");
|
|
const required = require("@validatem/required");
|
|
const arrayOf = require("@validatem/array-of");
|
|
|
|
module.exports = function (operations) {
|
|
const isWhereObject = require("./is-where-object")(operations);
|
|
|
|
return wrapError("Must be a list of WHERE condition objects", [
|
|
arrayOf([ required, isWhereObject ])
|
|
], { preserveOriginalErrors: true });
|
|
};
|