Defining abstract validation rules
An abstract validation rule does not have inputType, inputName and uri attributes.
These attributes are provided by the validation rule extending the abstract validation rule. You can define a validation rule as an abstract validation rule by setting the value of abstract attribute to true. For example,
<ValidationRules>
<Rule id="abstract1" ruleType="Regex" abstract="true" maxLength="10"
minLength="0" allowNull="false" >
<Whitelist>
<RegularExpression ref="regex1" />
</Whitelist>
</Rule>
<Rule id="abstract2" ruleType="Java" impl="com.sterling.validation.testRule"
abstract="true">
</Rule>
</ValidationRules>
<Rule id="sampleRule1" extends="uifwkimpl-json-xapi-input-param-value"
inputType="HTTPParameterValue" inputName="getCategoriesList"/>
The
abstract rule uifwkimpl-json-xapi-input-param-value
is
of type Java™.
Default JSON values used in the application have
already been registered with validation rules. For example, the request
parameters scControllerInput
, scContorllerData
and wizardData
are
the three primarily used JSON attributes in the application. For these
the java validation rule is registered in the file uifwkimpl_validationrules.xml
located
in the <INSTALL_DIR>/repository/eardata/platform_afc_ui_impl/war/WEB-INF/validationrules
directory.