-
-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detailed pattern
violation errors
#2332
Labels
Comments
This isn't something we'd want to add to the core library, but you could always try implementing your own solution using custom keywords. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Ajv you are you using?
8.12.0
What problem do you want to solve?
More explicit error details when using
pattern
onstring
properties.Current behaviour:
What do you think is the correct solution to problem?
It would be nice to show the location in the string where the pattern is violated.
I couldn't find any JS API that would return errors when matching a string from a regex.
However, it seems that negating (not sure if that's generalizable) a given regex could do the trick:
The text was updated successfully, but these errors were encountered: