{"record":{"id":"c4eb6fc726dd8855","repo":"remoteintech/remote-jobs","slug":"invalid-company-size-data-company-size-mu","errorCode":null,"errorMessage":"Invalid `company_size`: \"${data.company_size}\". Must be one of: ${VALID_COMPANY_SIZES.join(\", \")}","messagePattern":"Invalid `company_size`: \"(.+?)\"\\. Must be one of: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":".github/scripts/validate-companies.js","lineNumber":129,"sourceCode":"    }\n  }\n\n  // Validate enum values (only if field exists)\n  if (data.region && !VALID_REGIONS.includes(data.region)) {\n    errors.push(\n      `Invalid \\`region\\`: \"${data.region}\". Must be one of: ${VALID_REGIONS.join(\", \")}`\n    );\n  }\n\n  if (data.remote_policy && !VALID_REMOTE_POLICIES.includes(data.remote_policy)) {\n    errors.push(\n      `Invalid \\`remote_policy\\`: \"${data.remote_policy}\". Must be one of: ${VALID_REMOTE_POLICIES.join(\", \")}`\n    );\n  }\n\n  if (data.company_size && !VALID_COMPANY_SIZES.includes(data.company_size)) {\n    errors.push(\n      `Invalid \\`company_size\\`: \"${data.company_size}\". Must be one of: ${VALID_COMPANY_SIZES.join(\", \")}`\n    );\n  }\n\n  // Validate technologies array\n  if (data.technologies && Array.isArray(data.technologies)) {\n    for (const tech of data.technologies) {\n      if (!VALID_TECHNOLOGIES.includes(tech)) {\n        errors.push(\n          `Invalid technology tag: \"${tech}\". Valid tags: ${VALID_TECHNOLOGIES.join(\", \")}`\n        );\n      }\n    }\n  }\n\n  // Validate slug matches filename\n  if (data.slug) {\n    const expectedSlug = basename(filePath, \".md\");\n    if (data.slug !== expectedSlug) {","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/remoteintech/remote-jobs/blob/b1dd8deb1945e5ff58f9e9c35e318f53c8871930/.github/scripts/validate-companies.js#L111-L147","documentation":"Enum check at lines 127-131. If data.company_size is present but not in VALID_COMPANY_SIZES (keys of labels().companySize from src/_data/labels.js), the value is rejected. Allowed values include the likes of tiny, small, medium, large, enterprise, startup.","triggerScenarios":"Contributor writes a number ('50') or free text ('mid-size'); casing error ('Small'); key was renamed in labels.js.","commonSituations":"New contributor assumes a numeric scale; outdated example; company grew and the contributor guessed a key that doesn't exist.","solutions":["Pick the exact key from the error message's allowed list.","Add a new size bucket to labels().companySize if the current taxonomy is insufficient."],"exampleFix":"// before\ncompany_size: 50\n// after\ncompany_size: small","handlingStrategy":"validation","validationCode":"const VALID_COMPANY_SIZES = Object.keys(labels().companySize);\nfunction validCompanySize(value) {\n  return VALID_COMPANY_SIZES.includes(value);\n}","typeGuard":"function isCompanySize(value) {\n  return typeof value === 'string' && Object.keys(labels().companySize).includes(value);\n}","tryCatchPattern":null,"preventionTips":["Use the canonical bucket key, not a numeric headcount.","Add new buckets to labels.js before referencing them in profiles."],"tags":["enum","company-size","frontmatter","labels"],"backgroundTag":null,"analyzedSha":"b1dd8deb1945e5ff58f9e9c35e318f53c8871930","analyzedAt":"2026-08-13T04:09:00.804Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}