-
Notifications
You must be signed in to change notification settings - Fork 6
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
[BUG/Feature] When using native required, the (vest) validation is ignored and no error message is shown #9
Comments
I just came across the same problem. I'm using mat-form-field and matInput, and I want to use the Some sort of angular validation is working as the FormControl.errors gets I would really like to be able to have the vest suite run so that I can set a custom error message (or translation key). |
The native required is a directive that creates a different validator on the side that validates in Angular. It doesn't have anything to do with vest. The goal of vest is to have one place where all validations lie, not have anymore validations in the template. Even if we would trigger vest, it would not know how to map this required to the actual validations. The vest suite should be the single source of truth where all validations lie. Does that make sense? |
Yes it makes sense, and I do like this approach. I'm working separately on a solution for my other problem (the required marker): |
should we somehow catch it. And show an informative message.
Or something. Would be good if it is mentioned in the documentation. troubleshooting or be aware Or something similar 👍🏼 |
When you add a
required
to an input. The vest validation is ignoredWe should find a way to work together with the native validations (and native validation errors)
Or even show the 'native' message when there is no Vest message
The text was updated successfully, but these errors were encountered: