Data Validation

SKIP AHEAD TO 
What is data validation?
Data Validation Options:
Text Input
Number Input
Date Input
File Upload
Slider


What is data validation?
 

Data validation allows users to validate end user inputs in FORM blocks. For example, a Text Input field in a FORM can be configured to validate and collect only email inputs to ensure that a valid email is entered by the end user.

Continue reading below for more data validation options.  

 

Data Validation Options:


Text Input
 

You can validate end user Text Inputs by: 

  1. Email - End users must enter aemail address in the Text Input field
  2. Character length - End users can only enter a specified number of characters set for the Text Input field (e.g. 15 characters)
  3. Regular expressions End user text inputs must match the regular expression pattern set by the Author

    What are regular expressions?
    Regular expressions (or RegEx) allows users to check series of characters for ‘matches’ in search patterns. In Checkbox, Authors can fully customise the String patterns expected from the end user to validate their input by using regular expressions. Custom error messages can also be created to help guide the user to enter the correct text input pattern. 

    For example:
    To prompt the user to enter their Tax File number (TFN) in the correct format with 8 or 9 digits separated by spaces (i.e. 123 456 789), use the following RegEx:

    (\d{8,9$})|(\d\d\d[ ]\d\d\d[ ]\d\d\d?)$

    And also add the following error message if the user input does not match the given format:

    "
    Please enter 8 or 9 digits and separate your TFN with a space for every 3 digits. E.g. 123 456 789.
    Learn more about and test your RegEx using the following resources: 

 

Number Input 

You can validate the number input from the end user by minimum or maximum values or both. 

  1. Only minimum value – If the user only limits the number input using a minimum value, the end user must enter a number that is above or equal to the minimum value
  2. Only maximum value – If the user only limits the number input using a maximum value, the end user must enter a number that is below or equal the maximum value
  3. Both minimum and maximum value - If the user limits the number input using both a minimum and maximum value, the end user must enter a number that is within the minimum and maximum range.

mceclip0.png


Date Input
 

 You can validate the date input from the end user by setting a date range by using either: 

  1. Date picker – The end user selects from a date range set by the Author of the App
  2. Date variables The end user selects from a date range that has been set dynamically based on their previous responses to the date fields in the Assessment. Enter the data variable WITHOUT double curly brackets ‘{{}}’. I.e. enter “DATE78” and NOT “{{DATE78}}”

V1.19_Release_Wiki__1__2020-10-27_01-41-45.png


File Upload
 

You can limit and validate the file type for the file that is uploaded by the user. End users can only upload files specified in the file type options set by the Author.

File option include:  

  • All file types 
  • Document Files Only (PDF, DOCX, DOC) 
  • Image Files Only (JPEG, PNG, SVG) 
  • Spreadsheet Files Only (XLSX, XLS, CSV) 

Learn more about File Upload 

V1.19_Release_Wiki__1__2020-10-27_01-42-23.png



Slider
 

You can limit and validate the slider range by minimum and maximum values and set the slider counts to a specified number. 

  1. Slider range - The end user must select a number on the slider that is within the minimum and maximum range
  2. Slider steps – The end user can only slide across the slider by a specified number. For example, if the slider step is set to 2, the end user will be only be able to slide the numbers up or down by 2 (i.e. 2, 4, 6...10 etc) 

V1.19_Release_Wiki__1__2020-10-27_01-43-52.png