Flow Forms Docs Flow Forms Docs

Input Rules

On this page 10

Input Rules let you set extra requirements for what someone can enter in a field. They run live as the respondent types, on top of the field's built-in checks (the Required toggle and any type-specific checks like email format).

Find the Input Rules option in the field's settings panel in the form builder. Fields that hold no typed value (Content, Group, Signature, Payment) don't offer it, and Phone Number fields manage their own rules from the mask.

Writing a Rule

Type one or more rules into the Input Rules field, separated by pipes (|):

code
min:3|max:50
code
alpha_num|max:20
code
regex:/^[A-Z]{2}-\d{4}$/

If a rule isn't valid, the form builder will reject it when you save the field. The check catches malformed rules rather than misspelled ones, so double-check the rule names against this page - and note the whole rule string is capped at 255 characters.

Length

Constrain the length of text or the size of a number.

Rule Description
min:3 At least 3 characters (or numeric value ≥ 3)
max:255 At most 255 characters (or numeric value ≤ 255)
size:5 Exactly 5 characters
between:5,20 Between 5 and 20 characters

Numbers

Use these on Number fields, or on text fields where the value should look like a number.

Rule Description
numeric Must be a number
integer Must be a whole number (no decimals)
decimal:2 Must have exactly 2 decimal places
gt:0 Greater than 0
gte:1 Greater than or equal to 1
lt:1000 Less than 1000
lte:100 Less than or equal to 100

Letters & Patterns

Constrain which characters are allowed in a text value.

Rule Description
alpha Letters only
alpha_num Letters and numbers
alpha_dash Letters, numbers, dashes, and underscores
lowercase Must be lowercase
uppercase Must be uppercase
starts_with:DR- Must start with the given text
ends_with:.pdf Must end with the given text
regex:/^[A-Z]{2}\d{4}$/ Must match the given regular expression

Format

Built-in checks for common formats.

Rule Description
email A valid email address
url A valid URL
ip A valid IP address
uuid A valid UUID

Choice

Restrict input to a fixed set of values.

Rule Description
in:foo,bar,baz Must be one of the listed values
not_in:test,example Must not be one of the listed values

Date

Use these on Date fields. Reference dates can be today, tomorrow, yesterday, or any date in YYYY-MM-DD format.

Rule Description
date A valid date
after:today After the given date
after_or_equal:2026-01-01 On or after the given date
before:2030-01-01 Before the given date
before_or_equal:2026-12-31 On or before the given date

Yes / No

Use these on toggle / yes-no inputs.

Rule Description
boolean Must be a true/false value
accepted Must be yes, on, 1, or true. Handy for "I agree" style fields
declined Must be no, off, 0, or false

Tips

  • Input Masks shape the value as it is typed; pair a mask with a regex: rule when you need to enforce the format on submit.
  • Combine multiple rules with | to apply them all (e.g. alpha_dash|min:4|max:20).