remoteintech/remote-jobs · error
Invalid `remote_policy`: "${data.remote_policy}". Must be on
Error message
Invalid `remote_policy`: "${data.remote_policy}". Must be one of: ${VALID_REMOTE_POLICIES.join(", ")} What it means
Enum check at lines 121-125. If data.remote_policy is present but not in VALID_REMOTE_POLICIES (keys of labels().remotePolicy from src/_data/labels.js), the value is rejected. Allowed values include the likes of fully-remote, remote-first, remote-friendly, hybrid.
Source
Thrown at .github/scripts/validate-companies.js:123
}
// Check required fields
for (const field of REQUIRED_FIELDS) {
if (!data[field] || (typeof data[field] === "string" && !data[field].trim())) {
errors.push(`Missing required field: \`${field}\``);
}
}
// Validate enum values (only if field exists)
if (data.region && !VALID_REGIONS.includes(data.region)) {
errors.push(
`Invalid \`region\`: "${data.region}". Must be one of: ${VALID_REGIONS.join(", ")}`
);
}
if (data.remote_policy && !VALID_REMOTE_POLICIES.includes(data.remote_policy)) {
errors.push(
`Invalid \`remote_policy\`: "${data.remote_policy}". Must be one of: ${VALID_REMOTE_POLICIES.join(", ")}`
);
}
if (data.company_size && !VALID_COMPANY_SIZES.includes(data.company_size)) {
errors.push(
`Invalid \`company_size\`: "${data.company_size}". Must be one of: ${VALID_COMPANY_SIZES.join(", ")}`
);
}
// Validate technologies array
if (data.technologies && Array.isArray(data.technologies)) {
for (const tech of data.technologies) {
if (!VALID_TECHNOLOGIES.includes(tech)) {
errors.push(
`Invalid technology tag: "${tech}". Valid tags: ${VALID_TECHNOLOGIES.join(", ")}`
);
}
}View on GitHub (pinned to b1dd8deb19)
Solutions
- Use the exact kebab-case key from the error message's allowed list.
- If the policy genuinely doesn't fit, add the new key to labels().remotePolicy and verify rendering.
Example fix
// before remote_policy: fully remote // after remote_policy: fully-remote
Defensive patterns
Strategy: validation
Validate before calling
const VALID_REMOTE_POLICIES = Object.keys(labels().remotePolicy);
function validRemotePolicy(value) {
return VALID_REMOTE_POLICIES.includes(value);
} Type guard
function isRemotePolicy(value) {
return typeof value === 'string' && Object.keys(labels().remotePolicy).includes(value);
} Prevention
- Use the kebab-case key from labels.js, not a free-text description.
- When the policy taxonomy changes, sweep all profiles in one commit.
When it happens
Trigger: Contributor writes 'remote', 'fully remote' (space), 'Remote-First' (casing), or 'office-first'; taxonomy was renamed in labels.js without a profile update.
Common situations: Informal phrasing instead of the canonical kebab-case key; copy from an outdated template; the company changed policy and the contributor guessed the new key.
Related errors
- Invalid `region`: "${data.region}". Must be one of: ${VALID_
- Invalid `company_size`: "${data.company_size}". Must be one
- Invalid technology tag: "${tech}". Valid tags: ${VALID_TECHN
- Missing YAML frontmatter. The file must start with `---` fol
- Missing required field: `${field}`
AI-assisted analysis of remoteintech/remote-jobs@b1dd8deb19 (2026-08-13).
Data as JSON: /api/errors/0ba796f723faee74.
Report an issue: GitHub.