mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 09:31:13 -05:00
Fix: Implement company submission and validation plan
This commit is contained in:
@@ -72,7 +72,11 @@ export function validateEntityData(entityType: string, data: any): ValidationRes
|
||||
case 'designer':
|
||||
case 'operator':
|
||||
case 'property_owner':
|
||||
if (!data.company_type) errors.push('Company type is required');
|
||||
if (!data.company_type) {
|
||||
errors.push(`Company type is required (expected: ${entityType})`);
|
||||
} else if (data.company_type !== entityType) {
|
||||
errors.push(`Company type mismatch: expected '${entityType}' but got '${data.company_type}'`);
|
||||
}
|
||||
if (data.founded_year) {
|
||||
const year = parseInt(data.founded_year);
|
||||
const currentYear = new Date().getFullYear();
|
||||
|
||||
Reference in New Issue
Block a user