tv4
tv4 copied to clipboard
Not Case Sensitive
When I validate my schema it isn't failing when I put in different casing.
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"definitions": {},
"id": "http://example.com/example.json",
"properties": {
"clientCode": {
"id": "/properties/clientCode",
"minLength": 1,
"type": "string"
},
"secret": {
"id": "/properties/secret",
"minLength": 1,
"type": "string"
}
},
"required": [
"clientCode",
"secret"
],
"type": "object"
}
Data:
{
"ClientCode": "TEST",
"Secret": "1234A"
}
What I called:
tv4.validate(data, schema)
Returns
true
I wouldn't think this would be expected behavior.