From a56ba4cb2023b7242961ff0d462b72b5f5911879 Mon Sep 17 00:00:00 2001 From: vyshnav Date: Thu, 5 Dec 2024 12:41:26 +0530 Subject: [PATCH] add min for photo --- src/utils/zod-schemas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/zod-schemas.ts b/src/utils/zod-schemas.ts index 508f32b..42f5101 100644 --- a/src/utils/zod-schemas.ts +++ b/src/utils/zod-schemas.ts @@ -27,7 +27,7 @@ export const baseSchema = z.object({ name: z.string().min(2, { message: "Name must be at least 2 characters." }), email: z.string().email({ message: "Invalid email address." }), phone: z.string().regex(/^\d{10}$/, { message: "Phone number must be 10 digits." }), - photo: z.string(), + photo: z.string().min(1, { message: "Photo is required." }).url(), entityName: z.string().optional(), couponCode: z.string().optional(), foodPreference: z.enum(["veg", "non-veg"]),