diff --git a/src/lib/entityValidationSchemas.ts b/src/lib/entityValidationSchemas.ts index 57186cde..78086300 100644 --- a/src/lib/entityValidationSchemas.ts +++ b/src/lib/entityValidationSchemas.ts @@ -104,7 +104,7 @@ export const companyValidationSchema = z.object({ // Support both founded_date (preferred) and founded_year (legacy) founded_date: z.string().optional(), founded_date_precision: z.enum(['day', 'month', 'year']).optional(), - founded_year: z.number().int().min(1800).max(currentYear).optional().nullable(), + founded_year: z.coerce.number().int().min(1800).max(currentYear).optional().nullable(), headquarters_location: z.string().max(200, 'Location must be less than 200 characters').optional(), website_url: z.string().optional().refine((val) => { if (!val || val === '') return true;