schema update

This commit is contained in:
echo 2026-03-18 04:27:08 +01:00
parent cc2dbc3423
commit 16217f46ff
2 changed files with 4 additions and 2 deletions

Binary file not shown.

View File

@ -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");