I have two different forms on one page (one form show via modal, I use Bulma CSS framework). If I submit one of this form — it's not validates, because other form (on these page) is still not filled and rises error validation.
Can somebody help me to solve this issue? Please.
Answer is here: http://vee-validate.logaretm.com/examples.html#scope-example
Just add data-vv-scope attribute with form name to form tag and add scope params to submit form function 👍
@koddr the page not work :(
@olivebeto56 try this one: https://baianat.github.io/vee-validate/examples/scopes.html
This does not work if you have two separate methods for two different forms.
yes it doesn't work if you have two separate methods for two different forms !
Confirmed, does not work
Only work on two different form not different form elements
Only work on two different form not different form elements
I'm having the same problem. The validation works on both forms when I pass the scope but no longer highlights the fields or shows the error messages.
Only work on two different form not different form elements
I'm having the same problem. The validation works on both forms when I pass the scope but no longer highlights the fields or shows the error messages.
Got it to work now, I had to use:
:type="{ 'is-danger': errors.has('scope-name.fieldname') }"
:message="errors.first('scope-name.fieldnamee')"
The above link still doesn't work but I think it should go to the v2 docs here). Does v3 differ in how form scoping is handled?
Most helpful comment
Got it to work now, I had to use: