tv4 icon indicating copy to clipboard operation
tv4 copied to clipboard

Not Case Sensitive

Open jon49 opened this issue 7 years ago • 0 comments

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.

jon49 avatar Jun 14 '17 21:06 jon49