Conditional Validation
Conditional validation is the process of creating a rule which contains a condition that must first be met before validation is applied. For example, you may create a conditional validation rule on a ZIP Code field that only enforces the 'US Zip Code' rule, when the country field = 'USA'.
To create a conditional validation rule, click the icon next to the Conditional Validation property in the Field Validation Settings Panel. This property only appears in the panel after you choose a value for Validation.
Depending on your business requirements, you might also consider dependencies, and remote or multiple validations.
If you need to make a field required based on a condition, you can also use a dependency. First, click the Remove Condition button to clear all rules and reset to basic (non-conditional) validation.
Remote validation allows you to validate against a value already in the database. For example, you could check if there had already been a request for a specific item. Or, because you can examine the number of records returned, you could check for the number of existing entries for a specific item, and return an error if you only want to allow, say, 10 submissions that pertain to that item.
Multiple validation is simply a stacking of validation rules. For example, you could validate for a ZIP code if the country chosen is USA and validate for a Postal Code if the country chosen is Canada.
0 Comments