{"record":{"id":"f260fef47f3f179c","repo":"apache/superset","slug":"display-name-must-start-with-a-letter-and-can-cont","errorCode":null,"errorMessage":"Display name must start with a letter and can contain letters, numbers, spaces, hyphens, underscores, and dots (e.g., 'Dashboard Widgets')","messagePattern":"Display name must start with a letter and can contain letters, numbers, spaces, hyphens, underscores, and dots \\(e\\.g\\., 'Dashboard Widgets'\\)","errorType":"exception","errorClass":"ExtensionNameError","httpStatus":null,"severity":"error","filePath":"superset-extensions-cli/src/superset_extensions_cli/utils.py","lineNumber":277,"sourceCode":"    Validate and normalize display name format.\n\n    Args:\n        display_name: Human-readable extension name\n\n    Returns:\n        Cleaned display name\n\n    Raises:\n        ExtensionNameError: If display name is invalid\n    \"\"\"\n    if not display_name or not display_name.strip():\n        raise ExtensionNameError(\"Display name cannot be empty\")\n\n    # Normalize whitespace: strip and collapse multiple spaces\n    normalized = \" \".join(display_name.strip().split())\n\n    if not DISPLAY_NAME_REGEX.match(normalized):\n        raise ExtensionNameError(\n            \"Display name must start with a letter and can contain letters, numbers, spaces, hyphens, underscores, and dots (e.g., 'Dashboard Widgets')\"\n        )\n\n    # Check for only whitespace/special chars after normalization\n    if not any(c.isalnum() for c in normalized):\n        raise ExtensionNameError(\n            \"Display name must contain at least one letter or number\"\n        )\n\n    return normalized\n\n\ndef suggest_technical_name(display_name: str) -> str:\n    \"\"\"\n    Suggest technical name from display name.\n\n    Args:\n        display_name: Human-readable name (e.g., \"Dashboard Widgets!\")","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset-extensions-cli/src/superset_extensions_cli/utils.py#L259-L295","documentation":"Thrown by validate_display_name() when the normalized display name fails DISPLAY_NAME_REGEX. A valid display name must start with a letter and may then contain letters, numbers, spaces, hyphens, underscores, and dots — so input beginning with a digit, or containing punctuation like '!', '@', '#', parentheses, or quotes, is rejected. The name is whitespace-normalized (stripped, internal runs collapsed) before the regex runs.","triggerScenarios":"Passing display names like '1Dashboard' (leading digit), 'Dashboard Widgets!' (exclamation mark), \"Superset (charts)\" (parentheses), '#1 Widgets' (leading '#'), or any name with emoji/unicode punctuation. Raised from the CLI create/validate commands or a direct validate_display_name() call.","commonSituations":"Marketing-style names with taglines or exclamation points ('Widgets!'), names prefixed with a version or number ('2FA Helper'), localized names with non-Latin punctuation, or names copied from documents carrying smart quotes.","solutions":["Strip unsupported punctuation and start with a letter: 'Dashboard Widgets' instead of 'Dashboard Widgets!'.","If you want richer text, keep punctuation out of the display name and put it in descriptions/README where it is free-form.","For numbers, move them after the first word ('Helper 2' not '2 Helper') if the leading character is the only problem."],"exampleFix":"# before\nsuperset-extensions create my-org dashboard-widgets --display-name \"Dashboard Widgets!\"\n\n# after\nsuperset-extensions create my-org dashboard-widgets --display-name \"Dashboard Widgets\"","handlingStrategy":"validation","validationCode":"import re\nDISPLAY_RE = re.compile(r\"^[A-Za-z][A-Za-z0-9 _.-]*$\")\nnormalized = \" \".join(display_name.strip().split())\nif not DISPLAY_RE.match(normalized):\n    normalized = re.sub(r\"[^A-Za-z0-9 _.-]+\", \"\", normalized)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep marketing punctuation, parentheses, and leading digits out of display names; put rich text in descriptions.","Sanitize pasted names (strip smart quotes and symbols) before validation."],"tags":["cli","validation","naming","extensions","regex"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}