How do you usually to force a validation of fields in the form before you submit the form? Because the form that i am building leave that user click in the submit button without click in any other field.
I searched and dont finded the answer.
I do not see the need
It depends, if your component has only one form you can do this:
this.$validator.validateAll().then(() => {
// success
}).catch(() => {
// Failed
});
http://vee-validate.logaretm.com/examples#validate-form
if your component has multiple forms and you want to validate one in particular, you need to add data-vv-scope attribute on the forms and:
this.$validator.validateAll('scope').then(() => {
// success
}).catch(() => {
// Failed
});
It worked as expected, thank you and sorry I had the example in the documentation.
Most helpful comment
It depends, if your component has only one form you can do this:
http://vee-validate.logaretm.com/examples#validate-form
if your component has multiple forms and you want to validate one in particular, you need to add
data-vv-scopeattribute on the forms and:http://vee-validate.logaretm.com/examples#scope-example