Skip to content

Commit a56ba4c

Browse files
committed
add min for photo
1 parent 468d139 commit a56ba4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/zod-schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const baseSchema = z.object({
2727
name: z.string().min(2, { message: "Name must be at least 2 characters." }),
2828
email: z.string().email({ message: "Invalid email address." }),
2929
phone: z.string().regex(/^\d{10}$/, { message: "Phone number must be 10 digits." }),
30-
photo: z.string(),
30+
photo: z.string().min(1, { message: "Photo is required." }).url(),
3131
entityName: z.string().optional(),
3232
couponCode: z.string().optional(),
3333
foodPreference: z.enum(["veg", "non-veg"]),

0 commit comments

Comments
 (0)