You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
zoul0813
added a commit
to zoul0813/vue-form-generator
that referenced
this issue
Dec 21, 2018
The required validator is only needed if you are not validating anything other than a values existence. All built-in validators will return a "this field is required" message if schema.required = true.
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).
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: