Closed silfverstrom closed 9 years ago
Normally, all none specified keys would cause validation to fail. 'allowAllKeys' alters this behavior, and accepts none specified keys.
Can be used with
var schema = Duns.object().keys({ shouldExist: Duns.number(), }).allowAllKeys(); var obj = { shouldExist: 20, test1: 100, }; schema.validate(obj); // Returns true
Normally, all none specified keys would cause validation to fail. 'allowAllKeys' alters this behavior, and accepts none specified keys.
Can be used with