xxxxxxxxxx
<v-text-field
v-model="password"
label="Password"
name="password"
prepend-icon="mdi-lock"
type="password"
:rules="passwordRules"
/>
<v-text-field
v-model="confirmPassword"
label="Confirm Password"
name="confirmPassword"
prepend-icon="mdi-lock"
type="password"
:rules="confirmPasswordRules"
/>
xxxxxxxxxx
<v-text-field
v-model="password"
label="Password"
name="password"
prepend-icon="mdi-lock"
type="password"
:rules="passwordRules"
/>
<v-text-field
v-model="confirmPassword"
label="Confirm Password"
name="confirmPassword"
prepend-icon="mdi-lock"
type="password"
:rules="confirmPasswordRules"
/>
xxxxxxxxxx
data() {
return {
password: '',
confirmPassword: '',
passwordRules: [
(value) => !!value || 'Please type password.',
(value) => (value && value.length >= 6) || 'minimum 6 characters',
],
confirmPasswordRules: [
(value) => !!value || 'type confirm password',
(value) =>
value === this.password || 'The password confirmation does not match.',
],
}
},
xxxxxxxxxx
<v-text-field
v-model="password"
label="Password"
name="password"
prepend-icon="mdi-lock"
type="password"
:rules="passwordRules"
/>
<v-text-field
v-model="confirmPassword"
label="Confirm Password"
name="confirmPassword"
prepend-icon="mdi-lock"
type="password"
:rules="confirmPasswordRules"
/>