Closed msyesyan closed 2 years ago
Hey, I found the validate function cannot find unknow fields.
eg
schema
{ "type": "object", "properties": { "person": { "name": "string" } } }
data
{ "person": { "name": "abc", "other": "abc" } }
In this case, the Validate function cannot give any error or warnning message. you can try this one line
https://json-schema-validator.herokuapp.com/
https://stackoverflow.com/questions/32044761/json-schema-with-unknown-property-names
we can use additionalProperties: false to solve this problem, thx
additionalProperties: false
Hey, I found the validate function cannot find unknow fields.
eg
schema
data
In this case, the Validate function cannot give any error or warnning message. you can try this one line
https://json-schema-validator.herokuapp.com/