Commit d2c0f0a3f1b75f25bcb3a557123e2632011eb5be
1 parent
e0f163768c
Exists in
master
and in
3 other branches
fixed validation in
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
src/pages/Administrator/resetPassword.vue
... | ... | @@ -41,7 +41,7 @@ |
41 | 41 | v-model="resetPassword.confirmPassword" |
42 | 42 | :rules="rePasswordRule" |
43 | 43 | :error-messages="errors.collect('password2')" |
44 | - v-validate="{ required: true, is: resetPassword.newPassword }" | |
44 | + v-validate="{ required: false, is: resetPassword.newPassword }" | |
45 | 45 | data-vv-name="password2" |
46 | 46 | data-vv-as="password" |
47 | 47 | label="Re-Password" |
... | ... | @@ -109,7 +109,10 @@ export default { |
109 | 109 | }, |
110 | 110 | methods: { |
111 | 111 | reset() { |
112 | - if (this.$refs.form.validate()) { | |
112 | + if ( | |
113 | + this.$refs.form.validate() && | |
114 | + this.resetPassword.confirmPassword === resetPassword.newPassword | |
115 | + ) { | |
113 | 116 | this.loading = true; |
114 | 117 | this.resetPassword.roleName = this.resetPassword.name; |
115 | 118 | http() | ... | ... |