Sign In

Text

A single-line text input field with optional length and pattern validation.

The Text field is the most common input type. It renders a single-line text input suitable for short answers like names, titles, or codes. It supports variable interpolation in the placeholder and label, plus regex pattern validation for enforcing specific formats.

For the shared properties available on all fields (label, help, note, key, width, visual styling, required), see the Form Fields Overview.

Configuration

PropertyTypeDefaultDescription
placeholderstring"Enter text"Ghost text shown inside the input when empty. Supports "{{variable}}" interpolation.
validations.minLengthnumber--Minimum number of characters the user must enter
validations.maxLengthnumber--Maximum number of characters allowed
validations.patternstring--Regular expression the value must match (e.g. ^[A-Z]{2}\\d{4}$)
validations.patternMessagestring--Custom error message shown when the pattern validation fails

Validation

The Text field extends InputFieldBase, so the required toggle is available in the inspector. When enabled, the field must be non-empty before the form can be submitted.

Length constraints (minLength / maxLength) are enforced on submit. If a regex pattern is provided, the value is tested against it and the patternMessage is shown on failure.

Example Usage

A license plate field that requires exactly two uppercase letters followed by four digits:

{
  "type": "text",
  "label": "License Plate",
  "required": true,
  "placeholder": "AB1234",
  "validations": {
    "pattern": "^[A-Z]{2}\\d{4}$",
    "patternMessage": "Enter two letters followed by four digits"
  }
}

On this page

Text | Buildorado