Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Insert excerpt
_Banners
_Banners
nameactionflow
nopaneltrue


Excerpt
nameFullPage

How Validation Works in PhixFlow

Validation can be configured to check data as it is being entered and before completing an Actionflow. This could be from simply checking if a field has been completed, to checking for duplicate records.

Validation is checked for the following events:

  • When a user submits their data via a form e.g. saves the data (Default)
  • On Blur, which means once a user leaves a field
  • When an existing record is loaded

Applying Validation

We recommend validation is applied at the table level to attributes as it is then automatically applied everywhere the attribute is used, see Adding Validation to Table Attributes. However, where a form field is backed by a relational attribute, the validation set on the table attribute is not used.

For applying pre-set validation (e.g. mandatory, min/max length) to form fields on screens, see below, and for bespoke validation, see Custom Validation.

Table of Contents

Table of Contents
exclude^How Validation Works in PhixFlow$|^Applying Validation$|^Table of Contents$

Form Field Validation

Video Tutorial

Iframe
srchttps://youtube.com/embed/nI4OrR5fmTE?&rel=0&ytp-pause-overlay=&list=PLbPt6SI1Zhb9JAD6TfD-qGC6vzZXOznvn
width680px
titleAdding Form Field Validation
height400px

Form Field Validation - Mandatory Field

Setting a form field as mandatory.

  1. Right-click on the form field you would like to set as mandatory and choose
    Insert excerpt
    _set_validation
    _set_validation
    nopaneltrue
     
  2. The properties will open on the right, scroll down to the Validation section
  3. Click on the tickbox next to Mandatory
  4. Then toggle this on 
    Insert excerpt
    _toggle_on
    _toggle_on
    nopaneltrue
  5. Insert excerpt
    _save
    _save
    nopaneltrue
     your changes
  6. If you are using the Serene Grey Template, the following will be seen:
    1. The form field header text will show with an asterisk *
    2. The form fields that fail validation will have a red outline after changing the value or when a form is loaded with data in it, such as an edit form

Image Added

Insert excerpt
Component
Component
nameBooleanValidation
nopaneltrue

Form Field Validation - Minimum/Maximum Length

  1. Right-click on the form field you would like to set a minimum or maximum length for and choose
    Insert excerpt
    _set_validation
    _set_validation
    nopaneltrue
     
  2. The properties will open on the right, scroll down to the Validation section
  3. Click on the tickbox next to Validation Type
  4. Next to Validation Type, click 
    Insert excerpt
    _addIcon
    _addIcon
    nopaneltrue
    1. A validation type can also be selected from the drop-down, if the desired validation exists, or edited by clicking the Validation Type hyperlink
  5. The Validation Type properties open, see Validation Type
  6. Enter:
    1. Name, this should be indicative of its purpose. For example, minimum name length
    2. Base Type, select the type of data. For example, different data types have different parameters such as numbers specifying the maximum value
    3. Minimum Length (optional), sets the minimum number of characters. For example, 2
. Setting
    1. Maximum Length (optional), sets the maximum of characters. For example, 150.  If left blank there is no maximum
    2. Error Message (optional), enter a custom message or leave blank for the default message. This is shown when the field fails the validation check and you mouseover the field
  1. Insert excerpt
    _save
    _save
    nopaneltrue
     your changes
  2. If you are using the Serene Grey Template, the form fields that fail validation will have a red outline after changing the value or when a form is loaded with data in it, such as an edit form

Image Added

Form Field Validation - Matching a Given Pattern

  1. Right-click on the form field you would like to set a pattern match for and choose
    Insert excerpt
    _set_validation
    _set_validation
    nopaneltrue
     
  2. The properties will open on the right, scroll down to the Validation section
  3. Click on the tickbox next to Validation Type
  4. Next to Validation Type, click 
    Insert excerpt
    _addIcon
    _addIcon
    nopaneltrue
    1. A validation type can also be selected from the drop-down if the desired validation exists or edited by clicking the Validation Type hyperlink
  5. The Validation Type properties open, see Validation Type
  6. Enter:
    1. Name, this should be indicative of its purpose. For example, minimum name length
    2. Base Type, select String
    3. Pattern, define a pattern the input must adhere to in the form of a regular expression. Pattern examples are provided at the end of this section
  7. Insert excerpt
    _save
    _save
    nopaneltrue
     your changes
  8. If you are using the Serene Grey Template, the form fields that fail validation will have a red outline after changing the value or when a form is loaded with data in it, such as an edit form

Image Added

Example Patterns

See Regular Expressions for details on how to create a pattern.

DescriptionPattern
Alpha Only[A-Za-z]
Alpha Numeric including, hyphens, underscores, spaces, ampersands and full stops

[A-Za-z0-9\s\-_.)(\/\-\&]

Numeric Only[0-9]
Email

^[a-zA-Z0-9!#$%&'*+/=?^_‘{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_‘{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

Specific words e.g. hello or world\b(hello|world)\b




Image Modified