import { z } from 'zod' const ResponsibleContactPersonSchema = z.object({ relation: z.string({ required_error: 'Pilih jenis Penanggung Jawab' }).min(1, 'Pilih jenis Penanggung Jawab'), name: z.string({ required_error: 'Mohon lengkapi Nama' }).min(3, 'Mohon lengkapi Nama'), address: z.string({ required_error: 'Mohon lengkapi Alamat' }).min(3, 'Mohon lengkapi Alamat'), phone: z .string({ required_error: 'Mohon lengkapi Nomor HP' }) .min(8, 'Nomor HP minimal 10 digit') .max(15, 'Nomor HP maksimal 15 digit'), }) const ResponsiblePersonSchema = z.object({ contacts: z.array(ResponsibleContactPersonSchema).min(1, 'Minimal harus ada 1 penanggung jawab'), }) type PersonRelativeFormData = z.infer export { ResponsiblePersonSchema } export type { PersonRelativeFormData }