Update for new combinator API

remotes/1723093605276550129/master
Sven Slootweg 5 years ago
parent 26a67db79d
commit ae94d60c59

@ -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;
};

Loading…
Cancel
Save