From 841ba24ea72a778c4c237c58a990de2dcb60f8d5 Mon Sep 17 00:00:00 2001 From: Enrico Savioli Date: Mon, 27 Apr 2026 22:51:31 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Fix=20invalid=20email=20error=20?= =?UTF-8?q?message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the error message shown in Login and Signup forms when the user inserts an invalid email address. With this fix, all frontend tests pass. --- frontend/src/routes/login.tsx | 2 +- frontend/src/routes/signup.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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()