From 640693aeef396749b875fb8c3218042c1317a212 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 12 Jul 2025 01:36:03 +0530 Subject: [PATCH] feat: basic email validation --- src/pages/Login.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pages/Login.tsx b/src/pages/Login.tsx index b76f1fd8..91df171b 100644 --- a/src/pages/Login.tsx +++ b/src/pages/Login.tsx @@ -42,6 +42,12 @@ const Login = () => { const submitForm = async (e: any) => { e.preventDefault(); + +if (!email.includes("@")) { + notify("error", "Please enter a valid email."); + return; +} + setLoading(true); try { const { data } = await axios.post(