From c0563306e3757dcbcb97507ee0e304dcab6e0ef0 Mon Sep 17 00:00:00 2001 From: Omer Sabic Date: Wed, 29 May 2024 23:20:06 +0200 Subject: [PATCH] fixed optional fields in website form --- src/routes/(app)/website/schema.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/routes/(app)/website/schema.js b/src/routes/(app)/website/schema.js index 4cf232e..6b56be4 100644 --- a/src/routes/(app)/website/schema.js +++ b/src/routes/(app)/website/schema.js @@ -6,12 +6,12 @@ export const schema = z.object({ primary_color_hex: z.string().length(7), secondary_color_hex: z.string().length(7), text_color_hex: z.string().length(7), - domain: z.string(), + domain: z.string().optional(), use_freebie: z.boolean(), - freebie_name: z.string(), - freebie_url: z.string(), - freebie_image_url: z.string(), - freebie_text: z.string(), + freebie_name: z.string().optional(), + freebie_url: z.string().optional(), + freebie_image_url: z.string().optional(), + freebie_text: z.string().optional(), title: z.string(), subtitle: z.string(), }).superRefine((data, ctx) => {