Skip to content

Commit 841ba24

Browse files
committed
🔧 Fix invalid email error message
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.
1 parent 13652b5 commit 841ba24

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

frontend/src/routes/login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { PasswordInput } from "@/components/ui/password-input"
2323
import useAuth, { isLoggedIn } from "@/hooks/useAuth"
2424

2525
const formSchema = z.object({
26-
username: z.email(),
26+
username: z.email({ message: "Invalid email address" }),
2727
password: z
2828
.string()
2929
.min(1, { message: "Password is required" })

frontend/src/routes/signup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import useAuth, { isLoggedIn } from "@/hooks/useAuth"
2222

2323
const formSchema = z
2424
.object({
25-
email: z.email(),
25+
email: z.email({ message: "Invalid email address" }),
2626
full_name: z.string().min(1, { message: "Full Name is required" }),
2727
password: z
2828
.string()

0 commit comments

Comments
 (0)