Class MaxValidatorForNumber

  • All Implemented Interfaces:
    jakarta.validation.ConstraintValidator<jakarta.validation.constraints.Max,​Number>

    public class MaxValidatorForNumber
    extends Object
    implements jakarta.validation.ConstraintValidator<jakarta.validation.constraints.Max,​Number>
    Check that the number being validated is less than or equal to the maximum value specified.
    • Constructor Detail

      • MaxValidatorForNumber

        public MaxValidatorForNumber()
    • Method Detail

      • initialize

        public void initialize​(jakarta.validation.constraints.Max annotation)
        Specified by:
        initialize in interface jakarta.validation.ConstraintValidator<jakarta.validation.constraints.Max,​Number>
      • isValid

        public boolean isValid​(Number value,
                               jakarta.validation.ConstraintValidatorContext context)
        Specified by:
        isValid in interface jakarta.validation.ConstraintValidator<jakarta.validation.constraints.Max,​Number>