19. Data Validation
- Anthony George
- Zoe Baldwin
Owned by Anthony George
Introduction
Validation can be added to specific fields to check data as it is entered and before completing an Actionflow. Examples of validation include, checking if a field:
- has been completed
- contains certain numbers, letters or special characters
- is in a desired format, e.g. a website or email address
- and more...
Mandatory Fields
- Open the Companies Form screen from the screen's home page. This ensures there is no data selected.
- Ensure your screen is Unlocked.
- Double -click on the Company Name field to open its Styles tab
- Click on the Properties tab
- In the Validation section:
- Tick Mandatory and toggle it on
- Apply your changes
- Close and reopen the Companies Form to ensure the new formatting rule is applied.
- Lock the screen. Now the field label has an asterisk.
Perform Validation Before Saving
Note: This is for PhixFlow versions pre 10.1 only.
To ensure users cannot save the Companies Form until all validation requirements have been complied with, the Actionflow on the Save button must be updated.
- On the Companies Form, right-click on the Save button and choose Display Actionflow
- On the Actionflow, click Properties in the toolbar
- Toggle on Perform Validation before running
- Apply the changes
- Close the Companies Form and reopen it ensure the changes take affect
- Fill in any fields but leave Company Name blank
- Press Save
- An error message will show with Validation Failed
- The Company Name field border will appear red with an error message on mouse over
Exercise
- On your Companies Form, click on the Company Name field header
- Note: You may need to click on it twice to ensure the Properties that opens is for Static Text
- On the Styles tab, add a CSS property, which applies a red text colour when the mouse moves over the Company Name header
- CSS Tag: color
- Value: red
Show me how