diff --git a/frontend/src/routes/login.tsx b/frontend/src/routes/login.tsx index a1f83d7e5a..2161ebdc9c 100644 --- a/frontend/src/routes/login.tsx +++ b/frontend/src/routes/login.tsx @@ -23,7 +23,7 @@ import { PasswordInput } from "@/components/ui/password-input" import useAuth, { isLoggedIn } from "@/hooks/useAuth" const formSchema = z.object({ - username: z.email(), + username: z.email({ message: "Invalid email address" }), password: z .string() .min(1, { message: "Password is required" }) diff --git a/frontend/src/routes/signup.tsx b/frontend/src/routes/signup.tsx index 88c652c5b5..83b5c083a7 100644 --- a/frontend/src/routes/signup.tsx +++ b/frontend/src/routes/signup.tsx @@ -22,7 +22,7 @@ import useAuth, { isLoggedIn } from "@/hooks/useAuth" const formSchema = z .object({ - email: z.email(), + email: z.email({ message: "Invalid email address" }), full_name: z.string().min(1, { message: "Full Name is required" }), password: z .string()