Rethink Workflow provides an effective way to ensure inputs captured properly using Field Validation.
Required Validation
Required Validation allow the workflow designer to indicate the fields that need the end-user to fill in the value before taking any action.
How to Design
To indicate a field is required, the workflow designer can click on the Edit button to open the Property panel, switch to "VALIDATION" sub-tab, and select "Yes" for "Required?" option.
Usage
The required validation happens as the end-user is typing. The end-user has to enter the value for the required fields in order to take an action (transition). If there is any error, the system won't allow to proceed.
Using Custom Error Message for Required Validation
Instead of using the default error message, (e.g. "the value of this field is required"), the workflow designer can also specify a custom error message to make the form more user-friendly.
How to Design
To set the custom error message, use "Required Validation Error" option. This option allows to use
placeholders to make it dynamic based on the value enter.
Usage
When the required value is not provided, the system will print out the error set in the Design screen.
Advanced Validation
Rethink Workflow provides a powerful way to perform complex field validation using Validation Function and Invalid Error option.
Validating Function option contains an expression (in basic mode) or a javascript function (in advanced mode). This expression is evaluated at run-time to determine the returned boolean value. If the returned boolean value is
true, the field is considered to be valid.
Invalid Error option allow to customize the invalid error message if the field does not pass the Validating Function above.
You can refer to
Visibility Condition for entering values in
basic mode and
advanced mode.
Action-based Field Validation
By default, all fields in a form are validated. But in some scenarios, you might want to exclude some fields to allow the end-user to take an action. For example, you might want the approval to provide comment if he/she declined a
request for leave from an employee. However, the comment is not required when he/she approves the request.