-
Notifications
You must be signed in to change notification settings - Fork 532
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
when use multiple validations show multiple errors #563
Comments
…ltiple validators from returning "this field is required", etc)
The Your example is a bit confusing as well, as the value can't validate against the 'regexp' and the 'number' validator since your 'regexp' would not result in a valid number. All validators that fail are expected to return the failure messages, and display them. This allows the user to see all of the errors and correct the problem, rather than fixing one problem only to be displayed another error. I've pushed a PR that removes duplicate messages from the errors array, which should resolve this issue. Though you will still see multiple errors if more than one error is generated (and they are unique). |
…rrors Ref #563 - return unique validation errors
Hello, I'm using your component and I realized that when I use multiple validations in the same field it shows several errors on the page, I'll attach photos from the screen for you to understand.
I'm using this scheme:
however, using this schema, it generates this output:
I would like you to look at this problem, or guide me to the correct form, if there is one.
I imagine that it is a for in errors, and that it could be changed to a first so it showed only the first error, and when that error was corrected then it showed the other error, and so on.
in addition, the component is very good, very versatile, it helped me a lot, I will always use it, congratulations.
thank you so much.
The text was updated successfully, but these errors were encountered: