[Vuejs]-Vuelidate custom validation shows error on every element in $each

0👍

OK, I found a solution:
Here’s the key reason it happens, and I quote myself:

they’re inside a v-for loop

Since v-text-field inside the v-for loop – of course every element in this loop will have the same validations. The solution was to wrap the text field in a wrapper component, pass the necessary props and run validation for the prop only inside the component, while emitting result and dealing with it in the parent component.

Leave a comment