@@ -102,24 +102,16 @@ def validate_messages(cls, v):
102102class QuestionContentSchema(BaseModel):
103103 """Validation schema for question node content.
104104
105- Supported input types:
106- - text: Free text input
107- - number: Numeric input with optional min/max
108- - email: Email address input
109- - phone: Phone number input
110- - url: URL input
111- - date: Date picker
112- - choice: Single selection from options (buttons/radio)
113- - multiple_choice: Multiple selection from options (checkboxes)
114- - slider: Range slider (for age, ratings, scales)
115- - image_choice: Single selection from image-based options (for visual preference questions)
116- - carousel: Swipeable carousel for browsing items (e.g., books)
105+ input_type must be a lowercase identifier (e.g. text, choice, book_feedback).
106+ Common built-in types: text, number, email, phone, url, date, choice,
107+ multiple_choice, slider, image_choice, carousel. Flow authors can define
108+ custom input types without schema changes.
117109 """
118110
119111 question: Dict[str, Any] = Field(...)
120112 input_type: str = Field(
121113 ...,
122- pattern=r"^(text|choice|multiple_choice|number|email|phone|url|date|slider|image_choice|carousel) $",
114+ pattern=r"^[a-z][a-z0-9_]{0,49} $",
123115 )
124116 options: Optional[List[Dict[str, Any]]] = None
125117 validation: Optional[Dict[str, Any]] = None
0 commit comments