garage-erp/apps/dashboard/modules/vehicles/vehicle-document.schema.ts
Mohammad Khyata c7eb23dd3f fix bugs
Co-authored-by: Copilot <copilot@github.com>
2026-05-07 13:32:35 +03:00

14 lines
491 B
TypeScript

import { z } from "zod"
const relationFieldSchema = z.object({ value: z.string(), label: z.string() }).nullable()
export const vehicleDocumentFormSchema = z.object({
document_type: relationFieldSchema,
customer: relationFieldSchema,
document_number: z.string().optional(),
document_expire: z.string().optional(),
file: z.instanceof(File, { message: "File is required" }).nullable(),
})
export type VehicleDocumentFormValues = z.infer<typeof vehicleDocumentFormSchema>