How do I validate two different forms in a single component. $v cannot realize which form that I submit so when I submit first form, it triggers the second form's error messages as well. Same thing happens when I start with the second one. In other words, the first form I tried to submit gives an error, then I submit the other form. When I get back to the form I tried first, I see that it works too. What am I missing?
Personally, I would put the forms in different components. If that’s not an option, these answers may help: github.com/vuelidate/vuelidate/issues/421 github.com/vuelidate/vuelidate/issues/358
This is a great tutorial about how to validate forms with Vuelidate. But please, fellow viewers, never write forms like this, where you delete important attributes like "for" from or "id" from . This is terrible for accessibility.
So far this is the clearest explanation about using vuelidate, thanks
Thanks. Been a bit since I used Vuelidate, and this was a perfect refresher.
I was looking for a way to validate form inputs with VueJS, thanks for the content.
Thank youuu for this great tutorial ❤❤❤❤❤
thank you very much bro. it was very much helpful for me
Everything's clear, thank you!
Glad it helped!
Excellent video - thanks a lot!!
Thank you! Help me so much
How do I validate two different forms in a single component. $v cannot realize which form that I submit so when I submit first form, it triggers the second form's error messages as well. Same thing happens when I start with the second one. In other words, the first form I tried to submit gives an error, then I submit the other form. When I get back to the form I tried first, I see that it works too. What am I missing?
Personally, I would put the forms in different components. If that’s not an option, these answers may help:
github.com/vuelidate/vuelidate/issues/421
github.com/vuelidate/vuelidate/issues/358
Good job !
Good job man, but always push this code to any publish repository so we can use it?
Hmm.... I usually do. I must have forgot to attach it. Let me look on my computer for it.
Found it: bitbucket.org/TheDiligentDev/vue-form-validation/src/master/
@@DiligentDev please sir help me with phone number validation.
no one has created any form with phone number.
@@saikatgarai8310 You'll need to create a custom validator. For a phone number, I would use regex. vuelidate.js.org/#sub-regex-based-validator
hello, i do not use $v in tag span. It notification is 'Unresolved variable or type $v'. Plz help me
$v is part of the Vuelidate package. It’s difficult for me to diagnose the issue without seeing the code
make sure to import Vuelidate from "vuelidate"; in your main.js. Also don't forget to Vue.use(Vuelidate);
can anyone please help me with phone number validation???
Did you see my other comment about creating a custom validator using regex? They cover it in their docs.
This is a great tutorial about how to validate forms with Vuelidate.
But please, fellow viewers, never write forms like this, where you delete important attributes like "for" from or "id" from . This is terrible for accessibility.
Agreed. I just wanted to get through the tut but accessibility is SUPER important.