diff --git a/src/features/auth/components/SignUpForm.tsx b/src/features/auth/components/SignUpForm.tsx index fbe8f69..0e204d5 100644 --- a/src/features/auth/components/SignUpForm.tsx +++ b/src/features/auth/components/SignUpForm.tsx @@ -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;