Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Blur to show errors but not to fix errors #440
Is there a way to show errors on blur, but hide errors immediately as they are fixed?
In my opinion, both Vuelidate basic form examples (https://monterail.github.io/vuelidate/#sub-basic-form) are sub-optimal. Showing errors before blur can be jarring and annoying...it makes no sense to show an invalid email address error when the user has only typed the first letter.
Using v-model.lazy hides errors until after blur, which I prefer, the problem is that the user does not get real-time feedback when correcting errors (see https://jsfiddle.net/toequ523/). For example, as soon as an email address is corrected to be valid, the error should disappear immediately regardless of blur.
Is there a way to accomplish that with Vuelidate, or any other Vue validation library for that matter? I'm afraid we're letting how Vue works dictate the user experience, when really it should be the other way around. Happy to supply more examples to help clarify if needed.
I think you could maybe manually use the
I think if on
I can't vouch for this ... it is just what I understand from the docs
Great Q though and a perfectly rational thing to want out of validation library.. I have looked at both vuelidate/vee-validate and i appreciate the structure and approach of vuelidate (Data-based) much more, it's just much more DIY to get it hooked to the interface nicely.