modified phone no validation, accept upto min 6 and max 13
This commit is contained in:
parent
4753117d7b
commit
41494a0816
@ -24,7 +24,7 @@ export const ContactSchema = z
|
|||||||
phoneNumber: z
|
phoneNumber: z
|
||||||
.string()
|
.string()
|
||||||
.min(6, "Invalid Number")
|
.min(6, "Invalid Number")
|
||||||
.max(10, "Invalid Number")
|
.max(13, "Invalid Number")
|
||||||
.regex(/^[\d\s+()-]+$/, "Invalid phone number format").or(z.literal("")),
|
.regex(/^[\d\s+()-]+$/, "Invalid phone number format").or(z.literal("")),
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user