Interface Validator<T>
-
- Type Parameters:
T
- the expected type of the value to be validated
public interface Validator<T>
Defines a custom validation process to be executed when reading or writing values into a field of a java bean that is annotated withValidate
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
validate(T value)
Executes the required validations over a given value, returning any validation error messages that are applicable.
-
-
-
Method Detail
-
validate
java.lang.String validate(T value)
Executes the required validations over a given value, returning any validation error messages that are applicable. If no validation errors are found, returns a blankString
ornull
- Parameters:
value
- the value to be validated- Returns:
- a validation error message if the given value fails the validation process.
If the value is acceptable this method can return either a blank
String
ornull
-
-