Browse Source

fix: reset pw validation logic

Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>
pull/1531/head
Wing-Kam Wong 3 years ago
parent
commit
a8d09f0eff
  1. 32
      packages/nc-gui/pages/user/settings/index.vue

32
packages/nc-gui/pages/user/settings/index.vue

@ -219,16 +219,36 @@ export default {
valid: true, valid: true,
formRules: { formRules: {
email: [ email: [
v => !!v || 'E-mail is required', // E-mail is required
v => isEmail(v) || 'E-mail must be valid' v => !!v || this.$t('msg.error.signUpRules.emailReqd'),
// E-mail must be valid
v => isEmail(v) ||
this.$t('msg.error.signUpRules.emailInvalid')
], ],
password: [ password: [
[v => !!v || 'Password is required'], // Current Password
[v => !!v || 'New Password is required'], [
[v => v === this.passwordDetails.newPassword || 'Confirm password should match'] // Password is required
v => !!v || this.$t('msg.error.signUpRules.passwdRequired')
],
// New Password
[
// Password is required
v => !!v || this.$t('msg.error.signUpRules.passwdRequired'),
// You password must be atleast 8 characters
v => (v && v.length >= 8) || this.$t('msg.error.signUpRules.passwdLength')
],
// Confirm Password
[
// Password is required
v => !!v || this.$t('msg.error.signUpRules.passwdRequired'),
// TODO: i18n
v => v === this.passwordDetails.newPassword || 'Confirm password should match',
// You password must be atleast 8 characters
v => (v && v.length >= 8) || this.$t('msg.error.signUpRules.passwdLength')
]
] ]
} }
} }
}, },
head() { head() {

Loading…
Cancel
Save