Creating a Form Validation RuleLast Updated: 12/07/2015 Introduced in Verision: 2.0 |
Validation Rules evaluate a form value and return a “True” or “False” outcome, depending on whether the form value satisfies the rule’s condition(s). The platform includes several form validation rules, found under System > Shared Designer Elements > System Defaults > Default Form Validation Rules. To keep all form validation rules together for organizational purposes, you could create additional validation rules here (however, this is not required).
Example
In the resulting New Rule pop-up, name the new rule “Applicant Over Age 18”, and click OK.
Click the Add button in the Properties panel. Enter “DOB” as the name for the input data, and select DateTime as the data type. Click OK.
To function as a rule, the rule must have at least one condition. Begin building it in the Start Rule Window, by selecting the Add New Rule Step menu item.
The rule’s only condition will test whether the date provided by DOB is earlier than (before) the current date minus 18 years. If it is true, the applicant is of valid age. Expand the DOB variable and select the Date attribute. Click Next to proceed to the next part of the condition – the operator.
Because DOB is of the type DateTime, date rules appear in the operators list. Expand Date Rules, and select Less Than Or Equal To as the comparison operator. Click Next to proceed to the last part of the condition – the value.
Rules can compare anchors against a number of different values – constants (which never change), exposed inputs (which are extrapolated from complex data structures), null values, ignored values, converter flows, current date, or a computation of the date.
This rule requires comparison of DOB against Compute Date. To do this, select the Mapping Type “Compute Date.”