Once you create a validator or validatorChain, it appears in the appropriate validator type folder in the Validator perspective. To open the Validator perspective, select Window > Open Perspective > Nexaweb Validator.
To view the validators created for a validator type, click + beside the validator type folder to expand the list.
Either of the following icons appears beside the validators in the Validator view indicating:
|
Icon |
Description |
|
|
Local validator. Indicates validators created in the currently opened UI file. |
|
|
Global validator. Indicates validators created in another UI file in this project. |
|
|
Custom Validator |
You can assign validators to any textField or passwordField component in any file in the project in which you created the validator.
To assign a validator to a textField or passwordField component in any file in the project, follow these steps:
1. To open the Validator perspective, if not already open, select Window > Open Perspective > Nexaweb Validator.
2. Click + beside the type of validator to use to expand the list.
3. Drag a validator onto the textField or passwordField to validate.
The Set Validator Value and Invoker wizard appears.
4. Select Attribute to Validate.
The Selected Validator and Component section of this wizard displays the currently selected component.
|
To select attribute for currently selected component |
To select attribute for a different component |
|
a. Click the arrow in the attribute picklist under Select a attribute and select the attribute of this component to validate. b. Click Next |
a. Click the Select from other component radio button. b. Click Next. c. Select a component from the list on the left, and an attribute of that component from the list on the right. d. Click Next. |
A summary appears, displaying your selections.
5. Click Finish.
Nexaweb Studio adds the validator to the UI file.