Some checks failed
build.yaml / feat: Enhance Dataset Index with Dynamic Legend and Improved State Management for submitter, editor and reviewer (push) Failing after 0s
- Added a collapsible legend to display dataset states and available actions. - Implemented localStorage persistence for legend visibility. - Refactored dataset state handling with dynamic classes and labels. - Improved table layout and styling for better user experience. - Updated Tailwind CSS configuration to define new background colors for dataset states.
28 lines
871 B
TypeScript
28 lines
871 B
TypeScript
// app/validators/project.ts
|
|
import vine from '@vinejs/vine';
|
|
|
|
export const createProjectValidator = vine.compile(
|
|
vine.object({
|
|
label: vine.string().trim().minLength(1).maxLength(50) .regex(/^[a-z0-9-]+$/),
|
|
name: vine
|
|
.string()
|
|
.trim()
|
|
.minLength(3)
|
|
.maxLength(255)
|
|
.regex(/^[a-zA-Z0-9äöüßÄÖÜ\s-]+$/),
|
|
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-zA-Z0-9äöüßÄÖÜ\s-]+$/),
|
|
description: vine.string().trim().maxLength(255).minLength(5).optional(),
|
|
}),
|
|
);
|