[Vuejs]-Vuelidate never v.dirty always true even if all requirements are met

0👍

In validations, you have:

validations: {
    name: { required, name },
  },

required makes sense and is a valid vuelidate built-in validator per https://vuelidate.js.org/#sub-builtin-validators. However, name doesn’t. Unless you have a customer name validator defined somewhere in code you aren’t showing, you should try removing that. It could be failing to validate because it can’t validate against undefined, which from what I see in your code, name would surely evaluate to.

Try:

validations: {
    name: { required },
  },

Leave a comment