From 9a7da676ea19787520f4b5032b7ccaa72043fb7f Mon Sep 17 00:00:00 2001 From: Markus Thielker Date: Sun, 10 Mar 2024 18:25:11 +0100 Subject: [PATCH] N-FIN-7: add payment form schema --- src/lib/form-schemas/paymentFormSchema.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/lib/form-schemas/paymentFormSchema.ts diff --git a/src/lib/form-schemas/paymentFormSchema.ts b/src/lib/form-schemas/paymentFormSchema.ts new file mode 100644 index 0000000..0f8ede6 --- /dev/null +++ b/src/lib/form-schemas/paymentFormSchema.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; + +export const paymentFormSchema = z.object({ + id: z.number().positive().optional(), + amount: z.number().positive(), + date: z.date(), + payorId: z.number().positive(), + payeeId: z.number().positive(), + categoryId: z.number().positive().optional(), + note: z.string().max(255).optional(), +});