N-FIN-5: add entity form schema and component

This commit is contained in:
Markus Thielker 2024-03-09 18:02:54 +01:00
parent b6e144a7f5
commit dd2b62ed13
No known key found for this signature in database
2 changed files with 110 additions and 0 deletions

View 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),
});