gitscope
https://dev.kronoz.win/r/marzneshin.git
app/dashboard/src/pages/services/dialog/form-schema.ts · v0.1.0
Source
1 912788f Mardin 2y ago
2 912788f Mardin 2y ago import { z } from 'zod';
3 89f8f93 Mardin 2y ago import { ServiceCreate } from 'types';
4 912788f Mardin 2y ago
5 123de7e Mardin 2y ago export type FormType = Pick<ServiceCreate, 'name' | 'inbounds'>;
6 912788f Mardin 2y ago export const schema = z.object({
7 912788f Mardin 2y ago name: z.string().min(1, { message: 'Name is required' }),
8 912788f Mardin 2y ago inbounds: z.array(z.number()).nonempty({ message: 'At least one inbounds is required' }),
9 912788f Mardin 2y ago });