How to validate a range in my flow form?

This article will guide you in validating a number range in your flow form.

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

Step 1 - Create the first valid range by:

(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
 - Click on the 'Valid' word

Step 3 - Set up the Form Status, Colour and add a message if needed.

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

Step 4 - Invalidate everything outside of the valid range by inputting 1==1.

1==1