updated error msg for duplicate country
All checks were successful
Vercel Production Deployment / Deploy-Production (push) Successful in 1m19s
All checks were successful
Vercel Production Deployment / Deploy-Production (push) Successful in 1m19s
This commit is contained in:
parent
f52d6d6004
commit
72156c0778
@ -17,7 +17,7 @@ export async function addCountry(prevstate: any, formData: FormData) {
|
|||||||
name: z
|
name: z
|
||||||
.string()
|
.string()
|
||||||
.min(1, { message: "Name is required" })
|
.min(1, { message: "Name is required" })
|
||||||
.refine(() => !exists[0], { message: "Country already exists" }),
|
.refine(() => !exists[0], { message: `${name} already exists` }),
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
schema.parse({
|
schema.parse({
|
||||||
|
Loading…
Reference in New Issue
Block a user