Applying a Form Validation Rule
- Updated on 11 Sep 2017
- 2 minutes to read
In the following tutorial we are going to demonstrate how to use the Rule that we have built in Creating a Form Validation Rule tutorial on the Form .
In the Designer Folder we click Create Flow on theFolder Actions Panel .
Then, we Name the Flow and click Ok to proceed to the Flow Designer.
In the Flow Designer we add Show Form from Favorite Steps category.
We Name a Form and click Create to proceed to the Form Designer .
Our Form layout looks as following… We have a Date Time Picker control for user to be able to pick date, a Label , and a Button control for user to be able to submit the Form .
In the Form Properties panel on the right we locate Validation Rules category in Form Rules section and click Add New .
In the Add Validation Rules dialog we locate Validation Setup section, provide Name , keep Validation Source – Rule , and click Pick under Rule options.
In the Entity Picker window we search for our Rule , select it and click PICK .
After we picked a Rule we need to Update Rule Inputs . DOB Rule input shows up and we click an icon to edit it.
In the resulting Edit Rule Inputs window we select Form Component in the Input Type drop-down. Then, we select our DOB data value in Form Data Name drop-down. In this example we are going to run this Rule when DOB value is changed. When finished, click OK to save and continue.
Then, we edit Validation Break Text . This message will show up on the Form if our Validation Rule returns “False” .
From the Break Level drop-down we can select Fatal or Warning . Fatal level will not let the user to submit the Form . Warning level will only display the message.
Next, we pick the controls to which we need to apply this Validation to (in this example Button and Date Time Picker) . In the Rule Execution settings we pick events that will Trigger this Validation Rule (in this example Date Time Picker : Value Changed).
We keep Advanced settings default and click Ok to save Validation Rule and continue.
Validation Rule is added. This completes our Form . We save the Form and close Form Designer.
Back in the Flow Designer we connect the outcome from the Form to the End Step . This complete our Flow . We click Debug Flow on the top panel of the Flow Designer to test.
The Form loads and we pick a date that less than 18 years in past. Validation Rule is triggered and returned “False”.
Validation message shows up as designed.
If we pick appropriate date, Validation Rule returns “True” and we are able to Submit the Form .
Flow executes with no issues...