T
- type of validatablepublic class CompoundValidator<T> extends Behavior implements IValidator<T>
IValidator
. Once an error is reported against the IValidatable
being
checked, the rest of the validator chain is ignored.Constructor and Description |
---|
CompoundValidator()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
CompoundValidator<T> |
add(IValidator<T> validator)
Adds an
IValidator to the chain of validators. |
List<IValidator<T>> |
getValidators()
Gets an unmodifiable list of the registered validators.
|
void |
validate(IValidatable<T> validatable)
Validates the
IValidatable instance. |
afterRender, beforeRender, bind, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, onRemove, renderHead, unbind
public final CompoundValidator<T> add(IValidator<T> validator)
IValidator
to the chain of validators.validator
- an IValidator
to be addedValidationError
for chaining purposespublic final void validate(IValidatable<T> validatable)
IValidator
IValidatable
instance. Validation errors should be reported using
the IValidatable.error(IValidationError)
method.validate
in interface IValidator<T>
validatable
- the IValidatable
instance being validatedIValidator.validate(IValidatable)
public final List<IValidator<T>> getValidators()
IValidator
s inside this oneCopyright © 2006–2016 Apache Software Foundation. All rights reserved.