[Vuejs]-Vuetify password confirmation not working

3👍

  1. Vue component’s data must be a function, not an arrow function since an arrow function doesn’t have a this. From Vue.js docs:

Don’t use arrow functions on an options property or callback, such as
created: () => console.log(this.a) or vm.$watch('a', newValue => this.myMethod()). Since an arrow function doesn’t have a this, this
will be treated as any other variable and lexically looked up through
parent scopes until found, often resulting in errors such as Uncaught TypeError: Cannot read property of undefined or Uncaught TypeError: this.myMethod is not a function.

  1. You are referencing pw1 and pw2 which are not defined in data.

Here is Codepen

Leave a comment