schema update
This commit is contained in:
parent
cc2dbc3423
commit
16217f46ff
Binary file not shown.
@ -15,8 +15,10 @@ export const passwordSchema = z
|
||||
|
||||
export const phoneSchema = z
|
||||
.string()
|
||||
.regex(/^\+?[1-9]\d{1,14}$/, "Invalid phone number format")
|
||||
.optional();
|
||||
.optional()
|
||||
.refine((val) => !val || /^\+?[1-9]\d{1,14}$/.test(val), {
|
||||
message: "Invalid phone number format",
|
||||
});
|
||||
|
||||
export const dateTimeSchema = z.string().datetime("Invalid datetime format");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user