// app/validators/project.ts import vine from '@vinejs/vine'; export const createProjectValidator = vine.compile( vine.object({ label: vine.string().trim().minLength(1).maxLength(50), name: vine .string() .trim() .minLength(3) .maxLength(255) .regex(/^[a-z0-9-]+$/), description: vine.string().trim().maxLength(255).minLength(5).optional(), }), ); export const updateProjectValidator = vine.compile( vine.object({ // label is NOT included since it's readonly name: vine .string() .trim() .minLength(3) .maxLength(255) .regex(/^[a-z0-9-]+$/), description: vine.string().trim().maxLength(255).minLength(5).optional(), }), );