java.lang.Object
org.apache.logging.log4j.core.config.plugins.validation.validators.NotBlankValidator
All Implemented Interfaces:
ConstraintValidator<NotBlank>

public class NotBlankValidator extends Object implements ConstraintValidator<NotBlank>
Validator that checks if a CharSequence is not entirely composed of whitespace.
Since:
2.18.0
  • Constructor Details

    • NotBlankValidator

      public NotBlankValidator()
  • Method Details

    • initialize

      public void initialize(NotBlank anAnnotation)
      Description copied from interface: ConstraintValidator
      Called before this validator is used with the constraint annotation value.
      Specified by:
      initialize in interface ConstraintValidator<NotBlank>
      Parameters:
      anAnnotation - the annotation value this validator will be validating.
    • isValid

      public boolean isValid(String name, Object value)
      Description copied from interface: ConstraintValidator
      Indicates if the given value is valid.
      Specified by:
      isValid in interface ConstraintValidator<NotBlank>
      Parameters:
      name - the name to use for error reporting
      value - the value to validate.
      Returns:
      true if the given value is valid.