fix: valid password on reset-password page (#2753)

This commit is contained in:
yoogo
2024-03-08 18:44:49 +08:00
committed by GitHub
parent b6b58da2d2
commit bd26c933d2
3 changed files with 18 additions and 9 deletions

View File

@@ -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
}