From 19066dde8914342312dad660447fbfc8a7ebf2f0 Mon Sep 17 00:00:00 2001 From: Firman Ramdhani <33869609+firmanramdhani@users.noreply.github.com> Date: Mon, 15 Jun 2026 23:08:46 +0700 Subject: [PATCH] refactor: add trailing commas to zod schema definitions in reactive-watch-demo --- .../form-demo/components/reactive-watch-demo.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/web/src/apps/showcase/example/features/form-demo/components/reactive-watch-demo.tsx b/apps/web/src/apps/showcase/example/features/form-demo/components/reactive-watch-demo.tsx index 9ec0c3e..447d2c4 100644 --- a/apps/web/src/apps/showcase/example/features/form-demo/components/reactive-watch-demo.tsx +++ b/apps/web/src/apps/showcase/example/features/form-demo/components/reactive-watch-demo.tsx @@ -31,26 +31,26 @@ export default function ReactiveWatchDemo() { .and( z.discriminatedUnion('userType', [ z.object({ userType: z.literal('PERSONAL') }), - z.object({ userType: z.literal('CORPORATE'), corporateTaxId: taxIdValidator }) - ]) + z.object({ userType: z.literal('CORPORATE'), corporateTaxId: taxIdValidator }), + ]), ) .and( z.union([ z.object({ hasSpouse: z.literal(false) }), - z.object({ hasSpouse: z.literal(true), spouseName: spouseNameValidator }) - ]) + z.object({ hasSpouse: z.literal(true), spouseName: spouseNameValidator }), + ]), ) .and( z.union([ z.object({ newsletter: z.literal(false) }), - z.object({ newsletter: z.literal(true), newsletterEmail: newsletterEmailValidator }) - ]) + z.object({ newsletter: z.literal(true), newsletterEmail: newsletterEmailValidator }), + ]), ) .and( z.union([ z.object({ department: z.string().min(1), role: roleValidator }), - z.object({ department: z.union([z.literal(''), z.undefined(), z.null()]).optional() }) - ]) + z.object({ department: z.union([z.literal(''), z.undefined(), z.null()]).optional() }), + ]), ); const { control, handleSubmit, setValue, unregister, clearErrors } = useForm({