feat: Notify Invalid RegExp Patterns#261
Conversation
|
@microsoft-github-policy-service agree company="Shadowscape, Inc." |
|
The JSON schema spec says that regexes must match the Regular Expression specification from JavaScript. https://json-schema.org/understanding-json-schema/reference/regular_expressions. So likely this is an issue with the The error should be shown on the schema document and not on the document that is being validated. Something like 'Unable to validate value. Pattern {0} provided by the schema is not supported.' |
|
Thanks @aeschli! |

This PR allows users to be notified when an invalid regex pattern is encountered.
This is useful if a JSON schema is published that contains patterns that are not supported by
new RegExp().For example, as of time of writing, the
versionpattern for thecomposer.jsonschema includes a possessive quantifier (*+) that is not supported by JavaScript (see composer.json schema definition).