Validator interface, adding support for
validation 'hints'.
| Modifier and Type | Method and Description |
|---|---|
| public default < the type of the object to return T> T | Returns: a validator instance of the specified type;null if there
isn't a nested validator; an exception may be raised if the specified
validator type does not match.the class of the object to return type)Return a contained validator instance of the specified type, unwrapping as far as necessary. |
| public void | validate(Object
the object that is to be validated target, Errors contextual state about the validation process errors, Object... one or more hint objects to be passed to the validation engine validationHints)Validate the supplied |
| public default void | validateValue(Class<?>
the target type targetType, String the name of the field fieldName, Object the candidate value value, Errors contextual state about the validation process errors, Object... one or more hint objects to be passed to the validation engine validationHints)Validate the supplied value for the specified field on the target type, reporting the same validation errors as if the value would be bound to the field on an instance of the target class. |
| unwrap | back to summary |
|---|---|
| public default <T> T unwrap(Class<T> type) Return a contained validator instance of the specified type, unwrapping as far as necessary. | |
| validate | back to summary |
|---|---|
| public void validate(Object target, Errors errors, Object... validationHints) Validate the supplied The supplied This variant of Note Validation hints may get ignored by the actual target
| |
| validateValue | back to summary |
|---|---|
| public default void validateValue(Class<?> targetType, String fieldName, Object value, Errors errors, Object... validationHints) Validate the supplied value for the specified field on the target type, reporting the same validation errors as if the value would be bound to the field on an instance of the target class.
| |