Merge pull request 'issue(59):fixed the password validation rejecting emoji as special character' (#76) from issue-59 into main
Reviewed-on: https://10.10.0.4/AcuPedia/acupedia-mobile-ui/pulls/76 Reviewed-by: Amit Salunke <amit@noreply.localhost>
This commit is contained in:
commit
fc215f5f42
|
|
@ -89,7 +89,7 @@ export default function ForgotPasswordScreen() {
|
|||
} else if (!/[0-9]/.test(newPassword)) {
|
||||
setPasswordError("Must contain at least one number");
|
||||
hasError = true;
|
||||
} else if (!/[^A-Za-z0-9\s]/.test(newPassword)) {
|
||||
} else if (!/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~`]/.test(newPassword)) {
|
||||
setPasswordError("Must contain at least one special character");
|
||||
hasError = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export default function ChangePasswordScreen() {
|
|||
} else if (!/[0-9]/.test(newPassword)) {
|
||||
setNewError("Must contain at least one number");
|
||||
hasError = true;
|
||||
} else if (!/[^A-Za-z0-9\s]/.test(newPassword)) {
|
||||
} else if (!/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~`]/.test(newPassword)) {
|
||||
setNewError("Must contain at least one special character");
|
||||
hasError = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ export default function SignUpForm() {
|
|||
} else if (!/[0-9]/.test(password)) {
|
||||
setPasswordError("Password must contain at least one number (0-9)");
|
||||
hasError = true;
|
||||
} else if (!/[^A-Za-z0-9\s]/.test(password)) {
|
||||
} else if (!/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?~`]/.test(password)) {
|
||||
setPasswordError("Password must contain at least one special character (!@#$)");
|
||||
hasError = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue