From d2c0f0a3f1b75f25bcb3a557123e2632011eb5be Mon Sep 17 00:00:00 2001 From: Neeraj Sharma Date: Fri, 10 Jan 2020 18:11:20 +0530 Subject: [PATCH] fixed validation in --- src/pages/Administrator/resetPassword.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/Administrator/resetPassword.vue b/src/pages/Administrator/resetPassword.vue index d000313..d29616d 100644 --- a/src/pages/Administrator/resetPassword.vue +++ b/src/pages/Administrator/resetPassword.vue @@ -41,7 +41,7 @@ v-model="resetPassword.confirmPassword" :rules="rePasswordRule" :error-messages="errors.collect('password2')" - v-validate="{ required: true, is: resetPassword.newPassword }" + v-validate="{ required: false, is: resetPassword.newPassword }" data-vv-name="password2" data-vv-as="password" label="Re-Password" @@ -109,7 +109,10 @@ export default { }, methods: { reset() { - if (this.$refs.form.validate()) { + if ( + this.$refs.form.validate() && + this.resetPassword.confirmPassword === resetPassword.newPassword + ) { this.loading = true; this.resetPassword.roleName = this.resetPassword.name; http() -- 2.0.0