margherita pizza
margherita pizza

Reputation: 7185

Vue.js VeeValidate how to prevent validation until user finished the input

I'm using VeeValidate to validate user's inputs in my vue component. The problem is it is validate the fields immediately when user start to input the data in to field.

enter image description here

In here even I didn't finish the enter my email it says invalid email.

How can I prevent this? I want to display error message after the user focus out from the field.

Upvotes: 2

Views: 3292

Answers (2)

FINDarkside
FINDarkside

Reputation: 2445

You need to add

data-vv-validate-on="blur" 

to the component attributes. I'd link to the documentation, but I actually didn't find any mention of this attribute in their official documentation.

Upvotes: 4

Related Questions