diff --git a/src/app/login/forgot-password.tsx b/src/app/login/forgot-password.tsx index 098228b..93180a2 100644 --- a/src/app/login/forgot-password.tsx +++ b/src/app/login/forgot-password.tsx @@ -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; } diff --git a/src/app/profile/change-password.tsx b/src/app/profile/change-password.tsx index 5d82ba6..806b41e 100644 --- a/src/app/profile/change-password.tsx +++ b/src/app/profile/change-password.tsx @@ -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; } diff --git a/src/features/auth/components/SignUpForm.tsx b/src/features/auth/components/SignUpForm.tsx index fbe8f69..bc428c0 100644 --- a/src/features/auth/components/SignUpForm.tsx +++ b/src/features/auth/components/SignUpForm.tsx @@ -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; }