Skip to content
  • There are no suggestions because the search field is empty.

How to validate a range in my Flow form?

This article guides you through validating a number range in your flow form.

In this example, the field is valid between 5 and 15.

Step 1 — Build the valid range condition

Drag in the field from the form layout, drag in the operator, and enter the minimum value, 5. Drag in the AND operator, drag the field in again, drag in the operator, and enter the maximum value, 15:

(data["Number"]>=5)&&(data["Number"]<=15)
  • Dragging in the field from the form layout
  • Drag in the 'greater than ≥' symbol
  • Enter the minimum value 5
  • Drag in the 'AND' operator
  • Drag in the number field from the form layout
  • Drag in the 'less than ≤' symbol
  • Enter the minimum value 15

 

Step 2 — Set the rule to Valid

Click on the "Valid" word to configure the outcome.

Step 3 — Set the status, colour, and message

Set the Form Status, colour, and a message if needed.

Note: The Error status will not allow the user to submit the form until the field is valid. 

Step 4 — Add the catch-all invalid rule

Invalidate everything outside the valid range:

1==1