{"record":{"id":"b3c6770034eed2aa","repo":"gastownhall/beads","slug":"title-is-required","errorCode":null,"errorMessage":"title is required","messagePattern":"title is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"info","filePath":"cmd/bd/create_form.go","lineNumber":284,"sourceCode":"\tpriorityOptions := []huh.Option[string]{\n\t\thuh.NewOption(\"P0 - Critical\", \"0\"),\n\t\thuh.NewOption(\"P1 - High\", \"1\"),\n\t\thuh.NewOption(\"P2 - Medium (default)\", \"2\"),\n\t\thuh.NewOption(\"P3 - Low\", \"3\"),\n\t\thuh.NewOption(\"P4 - Backlog\", \"4\"),\n\t}\n\n\t// Build the form\n\tform := huh.NewForm(\n\t\thuh.NewGroup(\n\t\t\thuh.NewInput().\n\t\t\t\tTitle(\"Title\").\n\t\t\t\tDescription(\"Brief summary of the issue (required)\").\n\t\t\t\tPlaceholder(\"e.g., Fix authentication bug in login handler\").\n\t\t\t\tValue(&raw.Title).\n\t\t\t\tValidate(func(s string) error {\n\t\t\t\t\tif strings.TrimSpace(s) == \"\" {\n\t\t\t\t\t\treturn fmt.Errorf(\"title is required\")\n\t\t\t\t\t}\n\t\t\t\t\tif len(s) > 500 {\n\t\t\t\t\t\treturn fmt.Errorf(\"title must be 500 characters or less\")\n\t\t\t\t\t}\n\t\t\t\t\treturn nil\n\t\t\t\t}),\n\n\t\t\thuh.NewText().\n\t\t\t\tTitle(\"Description\").\n\t\t\t\tDescription(\"Detailed context about the issue\").\n\t\t\t\tPlaceholder(\"Explain why this issue exists and what needs to be done...\").\n\t\t\t\tCharLimit(5000).\n\t\t\t\tValue(&raw.Description),\n\n\t\t\thuh.NewSelect[string]().\n\t\t\t\tTitle(\"Type\").\n\t\t\t\tDescription(\"Categorize the kind of work\").\n\t\t\t\tOptions(typeOptions...).","sourceCodeStart":266,"sourceCodeEnd":302,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/create_form.go#L266-L302","documentation":"Inline huh form validation error: the Title field's Validate function rejects an empty or whitespace-only title. The form re-displays the field so the user can enter a value.","triggerScenarios":"User (or a scripted form driver) submits the interactive `bd create` form with an empty Title, or only whitespace.","commonSituations":"Pressing Enter through the form quickly; pasting a clipboard value that is whitespace; automation feeding blank input.","solutions":["Type a non-empty title and resubmit the field","Trim accidental whitespace from pasted input","Use non-interactive `bd create \"Title\"` instead of the form"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if strings.TrimSpace(title) == \"\" { return errors.New(\"title is required\") }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prompt users for a title before opening the interactive form","Trim pasted input","Prefer non-interactive `bd create \"Title\"` in scripts"],"tags":["validation","form","title","input"],"backgroundTag":"required-field-empty","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}