Validation rules
The Validator interface works by invoking a series of rules, and comparing entered data values against the rules. Each rule is an executable Java file that implements the Rule interface.
The validation plug-in supports two types of rules.
*
*
When a user saves data for a grid that uses a given validation plug-in, all of the rules are applied. The row-level rules are applied first, followed by the grid-level rules. Rules are applied in the order they are declared in the rules file.
Data validation rules file structure
A validation rules file is an XML file that contains one or more rules. Each rule can contain the following tags.
The Java class containing the commands for processing the rule. To use the sample range check rule, you enter: com.unicacorp.uap.grid.validation.rule.basic.RangeCheckRule
Sample data validation rules
IBM® Marketing Operations ships with the following sample rules.
<set-property property="beginCharacter" value="A"/> 
<set-property property="column" value="dyn_vendors.Name"/>
Class name: com.unicacorp.uap.grid.validation.rule.basic.BeginsWithRule
<set-property property="greaterThan" value="12/31/1999"/> 
<set-property property="lessThan" value="Today"/>
<set-property property="column" value=
"dyn_vendors.invoiceDate"/>
Class name: com.unicacorp.uap.grid.validation.rule.basic.DateCheckRule
<set-property property="minValue" value="1"/> 
<set-property property="maxValue" value="999999"/>
<set-property property="column" value=
"dyn_vendors.numEmployees"/>
Class name: com.unicacorp.uap.grid.validation.rule.basic.RangeCheckRule
Class name: com.unicacorp.uap.grid.validation.rule.basic.UniqueCheckRule
Validation rule example