T - Supported validators typepublic static interface Validator.Validatable<T>
Validators.| Modifier and Type | Method and Description |
|---|---|
Collection<Validator<T>> |
getValidators()
Get the registered validators.
|
default void |
validate(T value)
Checks the validity of the given
value against every registered validator, if any. |
Collection<Validator<T>> getValidators()
default void validate(T value) throws Validator.ValidationException
value against every registered validator, if any. If the value
is not valid, an Validator.ValidationException is thrown.
The Validator.ValidationException is Localizable, providing optional message code and arguments for
validation message localization.
value - Value to validateValidator.ValidationException - If the value is not valid, providing the validation error message.Copyright © 2019 The Holon Platform. All rights reserved.