Open sginer opened 6 years ago
Property with regexp pattern dosn not work fine. For example, this schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "id": { "type": "string", "pattern": "[A-Za-z0-9\\-\\.]{1,64}" } } }
validate this invalid json
{ "id" : "re@" }
but dont validate this
{ "id" : "@" }
Not a bug. Your REGEX is not what you think:
https://regex101.com/r/KcJKh9/1
You're after a ^[A-Za-z0-9.-]{1,64}$: https://regex101.com/r/APgsZP/2
^[A-Za-z0-9.-]{1,64}$
Regards, Blag
Property with regexp pattern dosn not work fine. For example, this schema
validate this invalid json
but dont validate this