Package ca.corbett.forms.validators


package ca.corbett.forms.validators
All FormFields support optional validation in the form of a FieldValidator. Each FormField can have zero or more FieldValidator instances assigned to it. These validators will be invoked on the field when the FormPanel is validated. A validation success or failure label will appear next to the FormField automatically, with helpful tooltip text as needed.

You can, of course, provide your own FieldValidator implementation, if you have specific business logic or validation rules that you need to use.

If multiple FieldValidators are assigned to a FormField, they will each be invoked, and all of them must return a successful validation in order for the field to be considered valid.

  • Class
    Description
    Provides an interface for performing validation on some type of FormField.
    A validator for use with FileField to ensure that the selected File is in a location that can be written.
    A FieldValidator that ensures that the chosen file or directory can be read.
    Similar to NonBlankFieldValidator for TextFields, this FieldValidator implementation insists that a FileField cannot contain a blank value.
    A FieldValidator that ensures that the chosen File can be written.
    A FieldValidator that ensures that the chosen File or Directory exists.
    A simple validator that can be attached to any FileField to ensure that the selected file is not a directory.
    The opposite of FileMustExistValidator, this one ensures that the selected file or directory does not already exist (such as for a save dialog).
    A field validator that works with both ListField and ListSubsetField to ensure that at least one item is selected.
    A simple Validator that can be attached to a ListField to ensure that the list is not empty.
    A simple field validator for text fields that ensures that the field does not have a blank value.
    A simple FieldValidator that can be attached to any ShortTextField to ensure that the field's value is either blank or a valid URL.
    Used by FieldValidator to report successful or unsuccessful validation on a FormField.
    A FieldValidator that enforces yyyy-MM-dd format on a given TextField.