Vuetify Form Validation - defining ES6 rules for matching inputs Vuetify Form Validation - defining ES6 rules for matching inputs vue.js vue.js

Vuetify Form Validation - defining ES6 rules for matching inputs


Rules are not the proper way of handling field confirmation.emailConfirmationRules are triggered only when emailConfirmation changes, but if you change email again, your fields won't match anymore without any break of rules.

You have to handle this manually:

methods: {  emailMatchError () {     return (this.email === this.emailConfirmation) ? '' : 'Email must match'  }}
<v-text-field v-model='emailConfirmation' :error-messages='emailMatchError()'></v-text-field>