schema update

This commit is contained in:
dimitar committed 2026-03-18 04:27:08 +01:00
1 parent cc2dbc3423
commit 16217f46ff
2 files changed
+4 -2

No files matched your search

Binary file not shown.
+4 -2
View File
@@ -15,8 +15,10 @@ export const passwordSchema = z
export const phoneSchema = z export const phoneSchema = z
.string() .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"); export const dateTimeSchema = z.string().datetime("Invalid datetime format");