PW confirmation

This commit is contained in:
Jörn-Michael Miehe 2019-05-06 17:21:21 +02:00
parent 939cc8d504
commit f39f80e64e

View file

@ -23,6 +23,16 @@
required
counter
></v-text-field>
<v-text-field
v-if="!showPassword"
v-model="passwordConfirm"
:rules="passwordConfirmRules"
:type="showPassword ? 'text' : 'password'"
label="Confirm Password"
required
counter
></v-text-field>
</v-card-text>
</FormDialog>
</template>
@ -43,9 +53,19 @@ export default {
password: '',
showPassword: false,
passwordRules: [v => !!v || 'Password is required']
passwordRules: [v => !!v || 'Password is required'],
passwordConfirm: '',
}),
computed: {
passwordConfirmRules() {
return [
() => this.password === this.passwordConfirm || "Passwords don't match"
]
},
},
methods: {
confirm() {
window.pkgs.axios