Interface ConstraintValidator

    • Method Detail

      • validate

        ConstraintViolation validate​(Object value,
                                     Annotation constraint)
        Validate the given value against the supplied constraint
        Parameters:
        value - the value that will be checked
        constraint - the constraint that the value will be checked against
        Returns:
        a ConstraintViolation object if there was a violation of the constraint, or null otherwise
        Throws:
        IllegalArgumentException - if the constraint is either null or not one of the constraint types supported by this validator