From 650e740f9f3b89f69bc8a4d86576d7a2ab3d83de Mon Sep 17 00:00:00 2001 From: Madhura68 Date: Wed, 29 Apr 2026 23:04:50 +0200 Subject: [PATCH] feat(ST-1112): add shared zod schema for task dialog Co-Authored-By: Claude Sonnet 4.6 --- lib/schemas/task.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/schemas/task.ts diff --git a/lib/schemas/task.ts b/lib/schemas/task.ts new file mode 100644 index 0000000..b4c0c3e --- /dev/null +++ b/lib/schemas/task.ts @@ -0,0 +1,12 @@ +import { z } from 'zod' +import { TaskStatus } from '@prisma/client' + +export const taskSchema = z.object({ + title: z.string().trim().min(1, 'Verplicht').max(120), + description: z.string().max(2000).optional(), + implementation_plan: z.string().max(10000).optional(), + priority: z.number().int().min(1).max(4), + status: z.nativeEnum(TaskStatus).optional(), +}) + +export type TaskInput = z.infer