{"record":{"id":"2a65fcff1a63848e","repo":"remotion-dev/remotion","slug":"the-sitename-must-match-the-regexp-0-9a-za","errorCode":null,"errorMessage":"The `siteName` must match the RegExp `/^[-0-9a-zA-Z!_.*'()]+/`. You passed: ${siteName}. Check for invalid characters.","messagePattern":"The `siteName` must match the RegExp `/\\^\\[-0-9a-zA-Z!_\\.\\*'\\(\\)\\]\\+/`\\. You passed: (.+?)\\. Check for invalid characters\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cloudrun/src/shared/validate-site-name.ts","lineNumber":23,"sourceCode":"\t\treturn;\n\t}\n\n\tif (typeof siteName !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`The 'siteName' argument must be a string if provided, but is ${JSON.stringify(\n\t\t\t\tsiteName,\n\t\t\t)}`,\n\t\t);\n\t}\n\n\tif (siteName === '.' || siteName === '..') {\n\t\tthrow new Error(\n\t\t\t'The `siteName` must not be `.` or `..`. You passed: ' + siteName + '.',\n\t\t);\n\t}\n\n\tif (!VALID_SITE_NAME_RE.test(siteName)) {\n\t\tthrow new Error(\n\t\t\t'The `siteName` must match the RegExp `/' +\n\t\t\t\tVALID_SITE_NAME_RE.source +\n\t\t\t\t'/`. You passed: ' +\n\t\t\t\tsiteName +\n\t\t\t\t'. Check for invalid characters.',\n\t\t);\n\t}\n};\n","sourceCodeStart":5,"sourceCodeEnd":32,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/cloudrun/src/shared/validate-site-name.ts#L5-L32","documentation":"Thrown by validateSiteName() when siteName contains characters outside the allowed set defined by VALID_SITE_NAME_RE = /^[-0-9a-zA-Z!_.*'()]+$/. The message embeds the regex source so the caller can see exactly which characters are permitted.","triggerScenarios":"Passing a site name containing spaces, slashes, commas, ampersands, @, #, or any other character not in the allowed class. Also triggered by names with leading/trailing whitespace or unicode characters.","commonSituations":"Using a human-readable label with spaces as the site name; including a path separator ('/') intending a folder hierarchy; copy/pasting a name with trailing whitespace or a special punctuation character.","solutions":["Restrict the site name to the allowed characters: alphanumerics, '-', and the punctuation in the regex.","Strip or replace disallowed characters (spaces, slashes) before passing.","Generate the name from a slug/kebab-case helper to guarantee validity."],"exampleFix":"// before\ndeploySite({ siteName: 'My Project Site!', ... });\n\n// after\nconst slug = 'My Project Site!'.replace(/[^-0-9a-zA-Z!_.*'()]/g, '-');\ndeploySite({ siteName: slug, ... });","handlingStrategy":"validation","validationCode":"const VALID_SITE_NAME_RE = /^[-0-9a-zA-Z!_.*'()]+$/;\nif (typeof siteName === 'string' && !VALID_SITE_NAME_RE.test(siteName)) {\n  throw new Error('siteName contains invalid characters');\n}","typeGuard":"const SITE_NAME_RE = /^[-0-9a-zA-Z!_.*'()]+$/;\nconst isValidSiteName = (v: unknown): v is string =>\n  typeof v === 'string' && SITE_NAME_RE.test(v);","tryCatchPattern":null,"preventionTips":["Generate site names with a kebab-case/slug helper.","Strip spaces and slashes from user-provided names before passing.","Mirror the validator's regex in your own form validation."],"tags":["cloudrun","validation","gcs","naming"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}