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)) {
|
} else if (!/[0-9]/.test(password)) {
|
||||||
setPasswordError("Password must contain at least one number (0-9)");
|
setPasswordError("Password must contain at least one number (0-9)");
|
||||||
hasError = true;
|
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 (!@#$)");
|
setPasswordError("Password must contain at least one special character (!@#$)");
|
||||||
hasError = true;
|
hasError = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!confirmPassword) {
|
if (!confirmPassword) {
|
||||||
setConfirmPasswordError("Please confirm your password");
|
setConfirmPasswordError("Please confirm your password");
|
||||||
hasError = true;
|
hasError = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue