diff --git a/src/components/Auth/SignIn.js b/src/components/Auth/SignIn.js
index 3ce73b9..aa37044 100644
--- a/src/components/Auth/SignIn.js
+++ b/src/components/Auth/SignIn.js
@@ -5,7 +5,6 @@ import { useNavigate } from 'react-router-dom';
import "../../styles/auth.css";
const isStrongPassword = (password) => {
- // At least one lowercase, uppercase, digit, symbol, min 8 char
const regex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\w\s]).{8,}$/;
return regex.test(password);
};
@@ -35,7 +34,7 @@ const SignIn = ({ onAuthSuccess }) => {
if (!formData.password) newErrors.password = 'Password is required';
else if (!isStrongPassword(formData.password)) {
- newErrors.password =
+ newErrors.password =
'Password must be at least 8 characters, include uppercase, lowercase, number, and symbol.';
}
@@ -81,39 +80,39 @@ const SignIn = ({ onAuthSuccess }) => {
required
/>
- {errors.email && (
-
{errors.email}
- )}
+ {errors.email || ""}
- {/* PASSWORD INPUT */}
+ {/* PASSWORD INPUT (wrapped to keep icon anchored) */}
-
-
setShowPassword(!showPassword)}
- role="button"
- aria-label="Toggle password visibility"
- tabIndex={0}
- onKeyDown={(e) =>
- e.key === 'Enter' && setShowPassword(!showPassword)
- }
- data-testid="password-toggle"
- >
- {showPassword ? : }
-
- {errors.password && (
-
{errors.password}
- )}
+
+
+ setShowPassword(!showPassword)}
+ role="button"
+ aria-label="Toggle password visibility"
+ tabIndex={0}
+ onKeyDown={(e) =>
+ e.key === 'Enter' && setShowPassword(!showPassword)
+ }
+ data-testid="password-toggle"
+ >
+ {showPassword ? : }
+
+
+
+ {/* Error message placed outside the inner wrapper so it won't change wrapper height */}
+
{errors.password || ""}