tasko/actions/create-card/schema.ts

15 lines
330 B
TypeScript
Raw Permalink Normal View History

2024-02-16 01:49:19 +00:00
import { z } from 'zod';
2024-02-15 02:30:10 +00:00
export const CreateCard = z.object({
2024-02-16 01:49:19 +00:00
title: z
.string({
required_error: 'Card title is required',
invalid_type_error: 'Card title must be a string',
})
.min(2, {
message: 'Card title must be at least 2 characters',
}),
2024-02-15 02:30:10 +00:00
boardId: z.string(),
listId: z.string(),
2024-02-16 01:49:19 +00:00
});