Class NotEmptyValidator

  • All Implemented Interfaces:
    jakarta.validation.ConstraintValidator<jakarta.validation.constraints.NotEmpty,​Object>

    public class NotEmptyValidator
    extends Object
    implements jakarta.validation.ConstraintValidator<jakarta.validation.constraints.NotEmpty,​Object>
    ConstraintValidator implementation for NotEmpty. Additionally, check the non-emptiness of an any object that has a public isEmpty():boolean or a valid toString() method.
    • Constructor Detail

      • NotEmptyValidator

        public NotEmptyValidator()
    • Method Detail

      • isValid

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