updated error msg for duplicate country
All checks were successful
Vercel Production Deployment / Deploy-Production (push) Successful in 1m19s

This commit is contained in:
christian 2024-06-02 16:12:23 +02:00
parent f52d6d6004
commit 72156c0778

View File

@ -17,7 +17,7 @@ export async function addCountry(prevstate: any, formData: FormData) {
name: z
.string()
.min(1, { message: "Name is required" })
.refine(() => !exists[0], { message: "Country already exists" }),
.refine(() => !exists[0], { message: `${name} already exists` }),
});
try {
schema.parse({