import { z } from 'zod' const PersonContactBaseSchema = z.object({ id: z.number().optional(), contactType: z.string({ required_error: 'Mohon pilih tipe kontak' }).min(1, 'Mohon pilih tipe kontak'), contactNumber: z.string({ required_error: 'Nomor kontak harus diisi' }).min(8, 'Nomor minimal 8 digit'), }) const PersonContactListSchema = z.object({ contacts: z.array(PersonContactBaseSchema).min(1, 'Minimal 1 kontak'), }) type PersonContactFormData = z.infer export { PersonContactListSchema, PersonContactBaseSchema } export type { PersonContactFormData }