feat: make responsiblePerson required on project creation/edit
- Zod schema: responsiblePerson now min(1) required, no longer optional - ProjectModal: required indicator (*), HTML required attribute, no undefined fallback - ProjectWizard: same fix for create flow - Existing projects with null responsiblePerson still work (DB allows null) - Validation enforced at API boundary on new creates/updates Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -28,7 +28,7 @@ export const CreateProjectBaseSchema = z.object({
|
||||
dynamicFields: z.record(z.string(), z.unknown()).default({}),
|
||||
blueprintId: z.string().optional(),
|
||||
status: z.nativeEnum(ProjectStatus).default(ProjectStatus.DRAFT),
|
||||
responsiblePerson: z.string().max(200).optional(),
|
||||
responsiblePerson: z.string().min(1, "Responsible person is required").max(200),
|
||||
color: z.string().regex(/^#[0-9a-fA-F]{6}$/, "Must be a hex color like #3b82f6").optional(),
|
||||
utilizationCategoryId: z.string().optional(),
|
||||
clientId: z.string().optional(),
|
||||
|
||||
Reference in New Issue
Block a user