|
|
|
@ -27,7 +27,7 @@ function containsRules(rules) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module.exports = function hasShape(rules) {
|
|
|
|
|
return combinator((object, applyValidators, context) => {
|
|
|
|
|
let validator = combinator((object, applyValidators, context) => {
|
|
|
|
|
let allowExtraProperties = defaultValue(context.allowExtraProperties, false);
|
|
|
|
|
|
|
|
|
|
let unexpectedPropertyErrors = asExpression(() => {
|
|
|
|
@ -80,4 +80,8 @@ module.exports = function hasShape(rules) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
validator.callIfNull = false;
|
|
|
|
|
|
|
|
|
|
return validator;
|
|
|
|
|
};
|
|
|
|
|