Is there a way to verify the pattern of an integer value?
{
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"definitions": {},
"id": "http://example.com/example.json",
"properties": {
"test": {
"type": "integer",
"pattern":"1343"
}
},
"type": "object"
}
Just a little test JSON
{
"test": 1
}
This always validates true with http://www.jsonschemavalidator.net/
I know that I can make a small workaround by using "minimum":1, "maximum":1 but this looks kind of strange and needs 2 lines for 1 validation.
Is there a way to check like on strings with "pattern" or anything else? Regex ^1$ doesn't work either