Form Validations components

<< Click to Display Table of Contents >>

Navigation:  Low-code Process Automation > Studio Cloud - Authoring environment > Bizagi Studio > Process wizard > Define Forms > Customizing controls behavior > Actions and Validations >

Form Validations components

Validations display (throw) validation messages to the end users when defined conditions are met and are defined by three components:

1.The validation's name.

2.The condition to evaluate.

3.The validation message to display if the condition is met.

 

To define a validation, go to the Actions & Validations wizard and click the Add button within the Validations tab:

 

Controlsbehavior2

 

 

1. Name the validation

The first step you should perform is to assign the validation a meaningful name. Although the Name field is not mandatory, we strongly recommend to fill it as it facilitates the organization, search and filtering of the validations you have created.

 

If you decide to leave this field empty, two things will happen:

1.The validation is created with Unnamed validation as assigned name. This name remains until you define a more meaningful one.

2.Each time you open the action, the cursor locates itself in the Name field in order to invite you to assign a name.

 

Controlsbehavior2a

 

2. Define the conditions (If)

When a validation is created, the first condition row is created automatically.

 

Controlsbehavior7

 

Conditions are defined by:

 

Control: Defines the control to be evaluated. This control MUST be included into the form where the validations are configured.

 

note_pin

Exclusive boolean controls within a table cannot be used as controls within actions and validations.

 

Operator: Defines the comparison operator for the condition.

 

Operator

Description

Applies to

changes to

Evaluates if the value of a control has changed to a specific value

Combo, Cascading combo, List, Radio, Search, Suggest, Currency, Number, Date

is different to

Evaluates if the value of a control is different to a specific value

Combo, Cascading combo, List, Radio, Search, Suggest, Currency, Number, Date

is empty

Evaluates if the control is empty

Combo, Cascading combo, List, Radio, Search, Suggest, Currency, Number

is not empty

Evaluates if the control is not empty

Combo, Cascading combo, List, Radio, Search, Suggest, Currency, Number

changes

Evaluates if the value of a control has changed

Combo, Cascading combo, List, Radio, Search, Suggest, Currency, Number, Date

does not contain

Evaluates if the value of a control does not contain an specific character

Text box

contains

Evaluates if the value of a control contains an specific character

Text box

begins with

Evaluates if the value of a control begins with an specific character

Text box

does not begins with

Evaluates if the value of a control does not begin with an specific character

Text box

is an invalid email

Evaluates if the value of a control is an invalid email

Text box

less than

Evaluates if the value of a control is less than a specific value

Date, Currency, Number

less than or equal to

Evaluates if the value of a control is less than or equal to a specific value

Date, Currency, Number

greater than

Evaluates if the value of a control is greater to a specific value

Date, Currency, Number

greater than or equal to

Evaluates if the value of a control is greater than or equal to a specific value

Date, Currency, Number

has a row deleted

Evaluates if a row has been deleted in a table.

Table

click

Evaluates if a button has been clicked

Button

is true

Evaluates if the value of a control is equal to true

Boolean

is false

Evaluates if the value of a control is equal to false

Boolean

has a file uploaded

Evaluates if a file control has a file uploaded

File

has not files uploaded

Evaluates if a file control has not files uploaded

File

 

Value: Defines the value to be compared with the control. This value can be a constant or a data binding.

 

Date type values

The date type values can be defined in three ways, a fixed date, a function or a data binding.

As a fixed date, you choose the specific date to be compared with the control.

As a function, you have available two functions today and now, both take the current day as the date to be compared with the control. The now function additionally contains the hour of the day and is available for date controls that have enable the show time property.

As a data binding, you choose another date type control from the form.

 

Controlsbehavior19

 

Multiple conditions

You can create compound conditions made of multiple conditions or group of conditions connected with the AND and OR operators.

To add a single condition click the Add a condition button; accordingly, select Add group to create a group of conditions. You can switch between the AND and OR operators by clicking them.

 

Controlsbehavior8

 

3. Define the validation message (Then)

Defines the message that will be displayed to the end users if the defined conditions are met. This message can be localized in order to be displayed in the proper language according to the end users configurations.

 

Controlsbehavior8b

 

Error handling

To guarantee metadata integrity, the Actions and Validations wizard verifies that validations are correctly defined before they can be saved. Hence, you must ensure that all the conditions (If) and the validation message (Then) fields are properly set.

 

Two types of error can occur when defining these settings:

1.If any of the required fields is missing and you click the Apply button to save the action, the wizard displays an error message. Furthermore, the required field is highlighted in red until you configure it.

2.If there are no rows to define conditions, the wizard displays an alert message indicating that you must include at least one expression. As the wizard always shows by default a row in the conditions component, this error occurs only if you delete this row.

 

Controlsbehavior8a

 

Validations examples

Click to see an example of how to configure basic validations


Last Updated 9/27/2022 7:11:42 PM