Schema example: z.object({ title: z.string().min(1).max(200), description: z.string().max(1000).optional(), })
Show field errors, disable submit when invalid/loading.
使用 Zod 与 React Hook Form 构建任务表单
--- frontmattername: Todo Form Validation description: Zod + react-hook-form for task forms triggers: form, validation, zod, react-hook-form, schema, input
Schema example: z.object({ title: z.string().min(1).max(200), description: z.string().max(1000).optional(), })
Show field errors, disable submit when invalid/loading.