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