Skip to main content

Adding Data Validation

videocam

Custom Validators are used to control and restrict the data in certain fields. They can be added or deleted via the input settings.


Validation Types#

TypeDescriptionData TypesFields
Greater ThanThe number or date entered needs to be greater than the provided value. In the case of dates, providing a value of 'today' allows you to use a date relative to today in the validation. See section below for details.numbers or dates.Select, Input, Date Entry, Mobile, Payment Amount Entry, Phone Number Entry, Text Area, {{field}}
Less ThanThe number or date entered needs to be less than the provided value. In the case of dates, providing a value of 'today' allows you to use a date relative to today in the validation. See section below for details.numbers or dates.Select, Input, Date Entry, Mobile, Payment Amount Entry, Phone Number Entry, Text Area, {{field}}
Equal ToThe entered value must equal the provided value. In the case of dates, providing a value of 'today' allows you to use a date relative to today in the validation. See section below for details.text, numbers, datesSelect, Input, Date Entry, Mobile, Payment Amount Entry, Phone Number Entry, Text Area, {{field}}
Not Equal ToThe entered value must not equal the provided valuetext, numbers, datesSelect, Input, Date Entry, Mobile, Payment Amount Entry, Phone Number Entry, Text Area, {{field}}
Minimum LengthThe length of the entered text must be greater than or equal to the provided valuetextSelect, Input, Mobile, Payment Amount Entry, Phone Number Entry, Text Area
Maximum LengthThe length of the entered text must be less than or equal to the provided valuetextSelect, Input, Mobile, Payment Amount Entry, Phone Number Entry, Text Area
Matches (Regex)The value entered must match the provided regextext, numberSelect, Input, Mobile, Payment Amount Entry, Phone Number Entry, Text Area
you can add multiple validations on the same input

for instance with an input of "age" you may have a maximum AND minimum

eg - to limit [age] input between 6 and 120

Select (as many as you like)ValueText
Greater Than6Are you playing on Mum's Ipad again?
- Less Than -120 ---Wow, you look great for your age! ---

Using Current Date in Validators#

Any date validator (Greater Than, Less Than, or Equal To) you can specify the date to be checked relative to the current date.

To do this enter the text 'today' followed by a + or a -, then the number of years, months, and days delimited by a pipe '|' that you want to add or subtract from todays date.

The date relative to the current date will be used for validation.

Examples using todays date#

Date ValidationFormula
in relation to "today"today(+-)years|months|days
Todaytoday
18 years agotoday-18
1 Year, 3 months in the Futuretoday+1|3
7 Days in the Pasttoday-0|0|7
For more information on adding the Validation into an Input see Adding Inputs
Using todays date to validate

In the above example, instead of an input of "age" you may have a "Date of Birth" field

eg - to limit [Date of Birth] to between 6 and 120

SelectValueText
Less Thantoday-6Are you playing on Mum's Ipad again?
Greater Thantoday-120Wow, you look great for your age!

Using Validators to ensure unique values#

Validators can not only take numbers, text, formulae and dates, they can also accept {{fields}}.

videocam Watch this example video tutorial

Remember to use your curly braces when quoting field names.

This allows fus to ensure 1 value entered does not equal another, let's take phone numbers as an example.

Mobile PhoneValueText
Minumum Length ------ 10 ------ --- Are you missing a digit? ---
Maximum Length ------ 10 ------ --- Too many digits! ---
Other PhoneValueText
Not Equal to{{Mobile Phone}}We already have this number

image Adding validation to an input#

<i className="material-icons color">image</i> Adding validation to an input