Fix password confirmation validation
@vuelidate/validators ^2.0.0 does not support literal strings as
references for sameAs. They instead treated as literal strings and it
means that the password confirmation must exactly match the passed
string which is obviously incorrect.
This essentially is just a correction of some artifacts caused by the
upgrade to Vue 3.
Change-Id: I41f6a1764c2dd3fcfbfd96d2da9b48e6e409fef0
Signed-off-by: Vladimir Novikov <MeVladimirNovikov@gmail.com>
diff --git a/src/views/ChangePassword/ChangePassword.vue b/src/views/ChangePassword/ChangePassword.vue
index a6ac5ab..18d9dcc 100644
--- a/src/views/ChangePassword/ChangePassword.vue
+++ b/src/views/ChangePassword/ChangePassword.vue
@@ -108,7 +108,7 @@
password: { required },
passwordConfirm: {
required,
- sameAsPassword: sameAs('password'),
+ sameAsPassword: sameAs(this.form.password),
},
},
};
diff --git a/src/views/ProfileSettings/ProfileSettings.vue b/src/views/ProfileSettings/ProfileSettings.vue
index 561816e..73ee63f 100644
--- a/src/views/ProfileSettings/ProfileSettings.vue
+++ b/src/views/ProfileSettings/ProfileSettings.vue
@@ -207,7 +207,7 @@
maxLength: maxLength(this.passwordRequirements.maxLength),
},
confirmPassword: {
- sameAsPassword: sameAs('newPassword'),
+ sameAsPassword: sameAs(this.form.newPassword),
},
},
};