TofuPilotTofuPilot

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: true

Properties

Display

You can configure how the textarea appears to the operator.

PropertyTypeRequiredDescription
keystringYesUnique identifier for accessing the value
typestringYesMust be "textarea"
labelstringNoDisplay label for the textarea
descriptionstringNoHelper text displayed below the textarea
placeholderstringNoHint text shown when empty
rowsnumberNoNumber of visible text lines

Value

You can set default values and bind to measurements or unit properties.

PropertyTypeRequiredDescription
default_valuestringNoDefault value to pre-fill the textarea
bindstringNoBind to unit property or measurement. See Collect Input for details.

Validation

You can validate input length before the value is submitted.

PropertyTypeRequiredDescription
requiredbooleanNoIf true, operator must provide input (shows "Required" badge)
min_lengthnumberNoMinimum number of characters required
max_lengthnumberNoMaximum 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: true

Defect 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: true

How is this guide?