modified phone no validation, accept upto min 6 and max 13

This commit is contained in:
Pramod Mahajan 2025-05-19 11:22:30 +05:30
parent 7613f36624
commit 126a84b5cc

View File

@ -24,7 +24,7 @@ export const ContactSchema = z
phoneNumber: z
.string()
.min(6, "Invalid Number")
.max(10, "Invalid Number")
.max(13, "Invalid Number")
.regex(/^[\d\s+()-]+$/, "Invalid phone number format").or(z.literal("")),
})
)