{"record":{"id":"3a32e48e014ea575","repo":"remoteintech/remote-jobs","slug":"invalid-careers-url-data-careers-url-must","errorCode":null,"errorMessage":"Invalid `careers_url`: \"${data.careers_url}\". Must be a full URL starting with https:// or http://","messagePattern":"Invalid `careers_url`: \"(.+?)\"\\. Must be a full URL starting with https:// or http://","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":".github/scripts/validate-companies.js","lineNumber":163,"sourceCode":"  if (data.slug) {\n    const expectedSlug = basename(filePath, \".md\");\n    if (data.slug !== expectedSlug) {\n      errors.push(\n        `Slug \"${data.slug}\" does not match filename \"${basename(filePath)}\". The slug must be \"${expectedSlug}\".`\n      );\n    }\n  }\n\n  // Validate URL format\n  if (data.website && !isValidUrl(data.website)) {\n    errors.push(\n      `Invalid \\`website\\` URL: \"${data.website}\". Must be a full URL starting with https:// or http://`\n    );\n  }\n\n  if (data.careers_url && !isValidUrl(data.careers_url)) {\n    errors.push(\n      `Invalid \\`careers_url\\`: \"${data.careers_url}\". Must be a full URL starting with https:// or http://`\n    );\n  }\n\n  // Check required markdown sections\n  const bodyContent = content.replace(/^---[\\s\\S]*?---/, \"\");\n  for (const section of REQUIRED_SECTIONS) {\n    const sectionPattern = new RegExp(\n      `^##\\\\s+${escapeRegExp(section)}\\\\s*$`,\n      \"m\"\n    );\n    if (!sectionPattern.test(bodyContent)) {\n      errors.push(`Missing required section: \"## ${section}\"`);\n    }\n  }\n\n  // Check that \"Company blurb\" has content (not just the heading)\n  const blurbMatch = bodyContent.match(\n    /^##\\s+Company blurb\\s*\\n([\\s\\S]*?)(?=^##\\s|\\s*$)/m","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/remoteintech/remote-jobs/blob/b1dd8deb1945e5ff58f9e9c35e318f53c8871930/.github/scripts/validate-companies.js#L145-L181","documentation":"URL format check at lines 161-165 using the same isValidUrl helper. careers_url is optional, so the `data.careers_url &&` short-circuit means an absent value is fine; a present-but-malformed value is rejected with the same protocol rule (http/https only).","triggerScenarios":"Careers URL pasted as a bare path (`/careers`); a mailto: or tel: scheme; URL with stray characters from copy-paste; an ATS-specific subdomain the contributor typed without a scheme.","commonSituations":"Contributor copies a relative link from the company site; the careers page is behind a third-party ATS (Greenhouse, Lever) and the full URL was reconstructed incorrectly; trailing slash or query string malformation.","solutions":["Supply the absolute URL with `https://`.","Remove any wrapping characters or whitespace.","Verify the URL resolves to a live careers page."],"exampleFix":"// before\ncareers_url: /careers\n// after\ncareers_url: https://acme.com/careers","handlingStrategy":"validation","validationCode":"function isValidUrl(str) {\n  try {\n    const u = new URL(str);\n    return u.protocol === 'https:' || u.protocol === 'http:';\n  } catch { return false; }\n}","typeGuard":"function isOptionalHttpUrl(str) {\n  return str == null || (typeof str === 'string' && isValidUrl(str));\n}","tryCatchPattern":null,"preventionTips":["Leave careers_url absent if you don't have a real careers page rather than guessing.","Use absolute https URLs only, never relative paths.","Verify the ATS link (Greenhouse/Lever) resolves before committing."],"tags":["url","validation","frontmatter","careers"],"backgroundTag":null,"analyzedSha":"b1dd8deb1945e5ff58f9e9c35e318f53c8871930","analyzedAt":"2026-08-13T04:09:00.804Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}