Validation rule example
The steps that follow describe how to import a validation rule file into Marketing Operations, add it to a template, and test it.
Before you begin
numEmps
field in a grid is 10 - 1000. <?xml version="1.0" encoding="UTF-8"?>
<validation-rules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<rule validationType="ROW">
<name>Range Check</name>
<desc>Checks Range for numeric type. Note: for field numEmps</desc>
<class>com.unicacorp.uap.grid.validation.rule.basic.RangeCheckRule</class>
<enable>true</enable>
<applies-to-tvc-id>vendors</applies-to-tvc-id>
<set-property property="minValue" value="10"/>
<set-property property="maxValue" value="1000"/>
<set-property property="column" value="dyn_vendors.numEmps"/>
</rule>
</validation-rules>
In this rule, the numEmps
field
is on a form with an internal name of vendors
. The
procedure that follows assumes that you have this form set up on your
system.