mirror of
https://codeberg.org/MarkusThielker/finances.git
synced 2025-07-01 11:09:18 +00:00
N-FIN-5: add entity form schema and component
This commit is contained in:
parent
b6e144a7f5
commit
dd2b62ed13
2 changed files with 110 additions and 0 deletions
8
src/lib/form-schemas/entityFormSchema.ts
Normal file
8
src/lib/form-schemas/entityFormSchema.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import { z } from 'zod';
|
||||
import { EntityType } from '@prisma/client';
|
||||
|
||||
export const entityFormSchema = z.object({
|
||||
id: z.number().positive().optional(),
|
||||
name: z.string().min(3).max(32),
|
||||
type: z.nativeEnum(EntityType),
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue