short_text renders a single-line text input. It works well for names, short answers, identifiers, and any value that fits on one line.
Submission value type: string
Field properties
| Property | Type | Required | Description |
|---|
id | string | Yes | Unique identifier within the form. Becomes the key in submission data. |
type | "short_text" | Yes | Must be short_text. |
label | string | LocaleMap | Yes | Label shown above the input. |
placeholder | string | LocaleMap | No | Placeholder text shown inside the input when empty. |
validators | Validator[] | No | Validation rules applied before the section is submitted. |
visible_when | string | No | JS expression; field is shown when truthy, hidden otherwise. Hidden fields are excluded from submission data. |
Validators
required
Field must not be empty.
Default error message: This field is required.
type: pattern
Input must match a regular expression.
validators:
- type: pattern
regex: "^[A-Z]{2}\\d{4}$"
message: Must be two uppercase letters followed by four digits.
| Property | Type | Required | Description |
|---|
regex | string | Yes | Regular expression to match against. |
message | string | LocaleMap | No | Error shown when the pattern does not match. |
Default error message: Please match the required format.
type: min
Minimum character count. The field is invalid if the submitted string has fewer than value characters.
validators:
- type: min
value: 2
message: Please enter at least 2 characters.
| Property | Type | Required | Description |
|---|
value | number | Yes | Minimum number of characters. |
message | string | LocaleMap | No | Error shown when the input is too short. |
Default error message: Must be at least {value} characters.
type: max
Maximum character count. The field is invalid if the submitted string has more than value characters.
validators:
- type: max
value: 100
message: Must be 100 characters or fewer.
| Property | Type | Required | Description |
|---|
value | number | Yes | Maximum number of characters. |
message | string | LocaleMap | No | Error shown when the input is too long. |
Default error message: Must be no more than {value} characters.
Validators run in the browser before each section is submitted. They enforce UX constraints, not security guarantees. If you need server-side validation, implement it in your webhook receiver.
Full example
The full_name field from the job application form with all validators applied:
version: 1
title: Join the team
sections:
- id: main
title: Apply to work with us
fields:
- id: full_name
type: short_text
label: Full name
placeholder: Jane Smith
validators:
- required
- type: min
value: 2
message: Full name must be at least 2 characters.
- type: max
value: 100
message: Full name must be 100 characters or fewer.
- type: pattern
regex: "^[A-Za-z .'-]+$"
message: Please use letters and standard punctuation only.
- id: role
type: single_select
label: Role you're applying for
options:
- Software Engineer
- Product Manager
- Designer
- id: email
type: email
label: Email address
next: done