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 with Validate
  • Method Summary

    Modifier and Type
    Method
    Description
    validate(T value)
    Executes the required validations over a given value, returning any validation error messages that are applicable.
  • Method Details

    • validate

      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 blank String or null
      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 or null