Adding a Validator to a Web Application

A validator defines a set of standard classes for performing common data validation checks, for example, a phone number input field must be numbers. A component can have one or more validators.

To add a validator:

  1. Select faces-config.xml in the WorkSpace Navigator of the Web Application Development perspective.

    The JSF Application Configuration editor opens.

  2. Select the Component tab of the editor.

  3. Expand the Validators section.

    A list of defined validators displays.

  4. Click Add.

    A new validator is added to the Converters list with the default name New Validatorx.

  5. (Optional) Change the default validator name to a unique, descriptive name in the Display name field of the General section.

  6. (Optional) Type a description in the Description field.

  7. Type an ID in the Validator ID field.

  8. Click Browse and select a Validator Class.

  9. Click Add in the Attributes section to add an attribute value.

  10. Click Add in the Properties section to add a property.

JSF Application Configuration Editor

WorkSpace Navigator

Web Application Development Perspective

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com