Skip to main content
io.input.textarea() requests a string value that can span several lines. Provided by the @awaitio/input-textarea package.
A Why refund pay_1042? text area with a filled-in reason and help text under it

Install

Setup

Register it under the key you want in io, see Input components:
app.ts

Usage

Props

Optional

The field is required. Chain .optional() to let it stay empty; the handler then gets string | undefined, see Optional fields.

Returns

string with the line breaks the person typed (\n).

Built-in validation

The field is always required. Checked on the server:

Custom validation

Chain .validate() for a check of your own. It runs on the server after the checks above, gets the value the handler would get and returns a message to show under the field, or nothing when the value is fine; see Custom validation.