Files
cpost-mobile/src/screens/auth/registeration/lib/form.ts
Samandar Turgunboyev f55a3a50ed added notification
2025-09-04 10:06:46 +05:00

22 lines
860 B
TypeScript

// form.ts
import { z } from 'zod';
export const FirstStepSchema = z.object({
firstName: z.string().min(3, "Eng kamida 3ta belgi bo'lishi kerak"),
lastName: z.string().min(3, "Eng kamida 3ta belgi bo'lishi kerak"),
address: z.string().min(3, "Eng kamida 3ta belgi bo'lishi kerak"),
phoneNumber: z.string().min(12, 'Xato raqam kiritildi'),
branchId: z.number().min(1, 'Filialni tanlang'),
recommend: z.string().min(1, 'Majburiy maydon'),
});
export const SecondStepSchema = z.object({
passportSeriya: z.string().length(2, '2 ta harf kerak'),
birthDate: z.string().min(8, 'Majburiy maydon'),
passportNumber: z.string().length(7, '7 ta raqam kerak'),
jshshir: z.string().length(14, '14 ta raqam kerak'),
});
export type FirstStepFormType = z.infer<typeof FirstStepSchema>;
export type SecondStepFormType = z.infer<typeof SecondStepSchema>;