Closed yoshuawuyts closed 7 years ago
Right now if extra properties are appended we allow them; we probably want a strict schema. This probably means we need to enable the filter property:
filter
var filter = validator.filter({ required: true, type: 'object', properties: { hello: {type: 'string', required: true} }, additionalProperties: false }) var doc = {hello: 'world', notInSchema: true} console.log(filter(doc)) // {hello: 'world'}
lol, no actually if the additionalProperties flag is set it'll be all strict and throw - not an issue heyyyyy
additionalProperties
Right now if extra properties are appended we allow them; we probably want a strict schema. This probably means we need to enable the
filter
property: