jpmckinney / validictory

🎓 deprecated general purpose python data validator
Other
240 stars 57 forks source link

Option to disallow unknown fields #32

Closed nicolaiarocci closed 12 years ago

nicolaiarocci commented 12 years ago

schema = {'type': 'object', 'properties': {'test':{'type': 'string'}}} data = {"test":"this_is_fine", "name": "not_in_the_schema"}

This will validate just fine, even if the 'name' field is not included in the schema definition. Depending on the use case this might be fine or not. An option for allowing unknown fields would be nice

nicolaiarocci commented 12 years ago

Blame on me, "additionalProperties" = False solves this issue. Closing the issue.