Class MaxValidatorForString

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

    public class MaxValidatorForString
    extends Object
    implements jakarta.validation.ConstraintValidator<jakarta.validation.constraints.Max,​String>
    Check that the String being validated represents a number, and has a value less than or equal to the maximum value specified.
    • Constructor Detail

      • MaxValidatorForString

        public MaxValidatorForString()
    • Method Detail

      • initialize

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

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