Development tools : XUI editor : Editing an XUI page : Editing the properties of the XUI widgets : Defining cross-field validation in a form : Defining xValidation in XUI editor
  
Defining xValidation in XUI editor
You can use xValidation section in Form widget to define cross-field validation easily. This page will provide the detailed process.
Prerequisite
The cross-field validation from server side are enabled by default. Make sure these codes are in btt.xml:
in the HTML section
<field id="serverXValidation" value="true" />
in the formatter's class table section
<field id="condition" value="com.ibm.btt.form.xval.FormXValidation" />
<field id="xValConditions" value="com.ibm.btt.form.xval.FormXValidations" />
About this task
In Condition, users can define how multiple correlative fields in a cross-field validation are valid or not valid, and the hint message will to be shown if values of correlative fields are not valid.
Note To directly provide codes for cross-validation on server side, see Performing cross-field validation.
Procedure
To define a cross-field validation, do the following steps:
In the Project Explorer View, open a XUI file and select the form which you want to define cross-field validation.
In the xValidation tab of Properties view, click the Add icon This graphic is described in the surrounding text. to add a new xValidation rule.
This graphic is described in the surrounding text.
Headless xValidation has a small decoration beside it.
This graphic is described in the surrounding text.
In Basic tab of Details section, input the name and the hint message which will be shown when the values of correlative fields are not valid in Hint field. Hint message supports NLS, you can select NLS element by clicking Browse button. Choose to define either invalid condition or valid condition by clicking the "Invalid condition" checkbox.
Select Condition tab of Details section to define condition of this validation. You can either choose Widget Function, Widget Property, Expression or Global Function to define the condition of this cross-field validation, and then click Apply Value to confirm.
This graphic is described in the surrounding text.
Go up to
Defining cross-field validation in a form