Validation rules

The validator works by invoking a series of rules, and comparing the input data against the rules. Each rule is an executable Java file that implements the Rule interface.

The validation plug-in supports two types of rules.

*
*

All the rules are fired when the grid data is saved. However, all row-level rules are fired first, and then grid-level rules are fired. Rules are fired in the order they are declared in the rules file.

Data validation rule file structure

A validation rules file is an XML file containing one or more rules. Each rule can contain the following tags.

*
false: the rule is disabled
*
true: the rule is enabled

Unica Marketing Operations ships with four sample rule types.

Ensures the text column being validated begins with the specified character. Set the following properties: beginCharacter, and column. For example: <set-property property="beginCharacter" value="A"/> <set-property property="column" value="dyn_vendors.Name"/> This rule checks the Name field (stored in the dyn_vendors database table) to make sure it begins with the letter A. Class name: com.unicacorp.uap.grid.validation.rule.basic.BeginsWithRule
Ensures the column being validated does not contain duplicate values. Set the column property. Class name: com.unicacorp.uap.grid.validation.rule.basic.UniqueCheckRule
Ensures the integer column being validated falls within the specified range. Set the following properties: minValue, maxValue, and column. For example: <set-property property="minValue" value="1"/> <set-property property="maxValue" value="999999"/> <set-property property="column" value="dyn_vendors.numEmployees"/> This rule checks the numEmployees field (stored in the dyn_vendors database table) to make sure it is between 1 and 999,999. Class name: com.unicacorp.uap.grid.validation.rule.basic.RangeCheckRule
Ensures the date column being validated falls within the specified range. Set the following properties: greaterThan, lessThan, and column. For example: <set-property property="greaterThan" value="12/31/1999"/> <set-property property="lessThan" value="Today"/> <set-property property="column" value="dyn_vendors.invoiceDate"/> This rule checks the invoiceDate field (stored in the dyn_vendors database table) to make sure it is not before the year 2000. Optionally, you can set the dateFormat property. If you add this property, dates must be entered in the specified format. You can set the following format values: dd/MM/yyyy, MM/dd/yyyy, dd/MM/yy, MM/dd/yy, yyyy-MM-dd, yyyy.MM.dd Class name: com.unicacorp.uap.grid.validation.rule.basic.DateCheckRule


IBM Unica Marketing Operations
 
8.5.0
For more information, see our support and community site: Customer Central