Create the custom validation rules using the Custom Plug-in feature.
In the Projects window, expand the Configuration node in the project you want to modify, and then double-click the Field Validation file.
The file opens in the NetBeans XML editor.
In the new rule element, create the following attributes:
name – A unique name for the validation rule.
object-name – The name of the master index Java class that defines the object to which the validation rule is applied, such as SystemObject or Parent_NameObject (where Parent_Name is the name of the parent object in the object definition)
class – The complete path of the Java class to call for the validation rule.
For example:
<ValidationConfig module-name="Validation" parser-class= "com.stc.eindex.configurator.impl.validation.ValidationConfiguration" <rules> <rule name="validate-auxiliary-id" object-name="PersonObject" class="com.stc.eindex.user.AuxiliaryId"/> <rule name="validate-birth-date" object-name="PersonObject" class="com.stc.eindex.user.BirthDate"/> </rules> </ValidationConfig> |
Save and close the file.