schema - Escaping Regex to get Valid JSON -


in schema, want recognize patterns restrict type of data user can enter. use regex restrict user can enter, regex flagged when try validate json using online validator one.

is there way make validator ignore regex special chars disagreeing it, still keep regex?

the weird thing validator trips on instances. instance, flags second , not first instance of regex despite them being identical here:

            "institutionname": {                 "type": "string",                 "description": "institution name",                 "label": "name",                 "input-type": "text",                 "pattern": "^[a-za-z0-9\s]+$"             },             "bio": {                 "type": "string",                 "label": "bio",                 "input-type": "text",                 "pattern": "^[a-za-z0-9\s]+$",                 "help-box": "tell yourself"             }, 

its slashes messing validation encode them using %5c hex encoding of \ or mike w says double escape \\ , decode them when want use them


Comments