Compare commits
1 Commits
main
...
fix/disall
| Author | SHA1 | Date |
|---|---|---|
|
|
5bab113a24 |
|
|
@ -72,11 +72,15 @@ 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 (/\p{Extended_Pictographic}/u.test(password)) {
|
||||
setPasswordError("Password must not contain emojis");
|
||||
hasError = true;
|
||||
} else if (!/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?`~]/.test(password)) {
|
||||
setPasswordError("Password must contain at least one special character (!@#$)");
|
||||
hasError = true;
|
||||
}
|
||||
|
||||
|
||||
if (!confirmPassword) {
|
||||
setConfirmPasswordError("Please confirm your password");
|
||||
hasError = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue