fix: valid password on reset-password page (#2753)
This commit is contained in:
parent
b6b58da2d2
commit
bd26c933d2
3 changed files with 18 additions and 9 deletions
|
|
@ -62,8 +62,10 @@ const ActivateForm = () => {
|
|||
showErrorMessage(t('login.error.passwordEmpty'))
|
||||
return false
|
||||
}
|
||||
if (!validPassword.test(password))
|
||||
if (!validPassword.test(password)) {
|
||||
showErrorMessage(t('login.error.passwordInvalid'))
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}, [name, password, showErrorMessage, t])
|
||||
|
|
|
|||
|
|
@ -71,10 +71,14 @@ export default function AccountPage() {
|
|||
showErrorMessage(t('login.error.passwordEmpty'))
|
||||
return false
|
||||
}
|
||||
if (!validPassword.test(password))
|
||||
if (!validPassword.test(password)) {
|
||||
showErrorMessage(t('login.error.passwordInvalid'))
|
||||
if (password !== confirmPassword)
|
||||
return false
|
||||
}
|
||||
if (password !== confirmPassword) {
|
||||
showErrorMessage(t('common.account.notEqual'))
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue