Textarea
Prompt operator with multi-line text input.
You can create a textarea with textarea:
ui:
components:
- key: test_notes
type: textarea
label: "Test Notes"
placeholder: "Enter detailed observations..."
description: "Provide any observations from the test"
required: trueProperties
Display
You can configure how the textarea appears to the operator.
| Property | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Unique identifier for accessing the value |
type | string | Yes | Must be "textarea" |
label | string | No | Display label for the textarea |
description | string | No | Helper text displayed below the textarea |
placeholder | string | No | Hint text shown when empty |
rows | number | No | Number of visible text lines |
Value
You can set default values and bind to measurements or unit properties.
| Property | Type | Required | Description |
|---|---|---|---|
default_value | string | No | Default value to pre-fill the textarea |
bind | string | No | Bind to unit property or measurement. See Collect Input for details. |
Validation
You can validate input length before the value is submitted.
| Property | Type | Required | Description |
|---|---|---|---|
required | boolean | No | If true, operator must provide input (shows "Required" badge) |
min_length | number | No | Minimum number of characters required |
max_length | number | No | Maximum number of characters allowed |
TofuPilot validates operator input before submission, preventing continuation until all constraints are met. For some workflows, this input validation can create workarounds where operators bypass the UI to proceed.
Instead, you can capture the input as a Measurement using Binding and validate it with Validators. TofuPilot will record the actual operator input while enforcing pass/fail criteria.
Examples
Length Validation
We'll enforce character count limits:
phases:
- name: Collect Observations
ui:
components:
- key: observations
type: textarea
label: "Observations"
placeholder: "Enter detailed observations..."
min_length: 10
max_length: 500
required: trueDefect Description
We'll collect detailed defect information:
phases:
- name: Report Defect
ui:
components:
- key: defect_description
type: textarea
label: "Defect Description"
placeholder: "Describe the defect in detail..."
rows: 5
min_length: 20
required: trueHow is this guide?