From 95687c903dab876be569517aebc7f73cef6748c3 Mon Sep 17 00:00:00 2001 From: Ankit Sisodya Date: Thu, 18 Dec 2025 01:56:38 +0530 Subject: [PATCH] fix: trim whitespace from email and password inputs --- src/components/Signin.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Signin.tsx b/src/components/Signin.tsx index 612e67a56..c5f752c75 100644 --- a/src/components/Signin.tsx +++ b/src/components/Signin.tsx @@ -40,7 +40,7 @@ const Signin = () => { const password = useRef(''); const handleEmailChange = (e: React.ChangeEvent) => { - const value = e.target.value; + const value = e.target.value.trim(); // Trim whitespace email.current = value; setFocusedIndex(0); @@ -114,6 +114,10 @@ const Signin = () => { e.preventDefault(); } + // Trim whitespace before validation + email.current = email.current.trim(); + password.current = password.current.trim(); + if (!email.current || !password.current) { setRequiredError({ emailReq: email.current ? false : true,