From f39f80e64e748f73da7880bc63217fbf91f5e044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 6 May 2019 17:21:21 +0200 Subject: [PATCH] PW confirmation --- frontend/src/components/forms/Register.vue | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/forms/Register.vue b/frontend/src/components/forms/Register.vue index 71c7525..5d7676c 100644 --- a/frontend/src/components/forms/Register.vue +++ b/frontend/src/components/forms/Register.vue @@ -23,6 +23,16 @@ required counter > + + @@ -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