Class NotBlankValidator

java.lang.Object
io.jmix.ui.component.validation.AbstractValidator<String>
io.jmix.ui.component.validation.NotBlankValidator
All Implemented Interfaces:
Validator<String>, Consumer<String>

@Component("ui_NotBlankValidator") @Scope("prototype") public class NotBlankValidator extends AbstractValidator<String>
NotBlank validator checks that value contains at least one non-whitespace character.

In order to provide your own implementation globally, create a subclass and register it in configuration class, for example:

     @Bean("ui_NotBlankValidator")
     @Scope(BeanDefinition.SCOPE_PROTOTYPE)
     @Primary
     protected NotBlankValidator notBlankValidator() {
          return new CustomNotBlankValidator();
     }
 
  • Constructor Details

    • NotBlankValidator

      public NotBlankValidator()
    • NotBlankValidator

      public NotBlankValidator(String message)
      Constructor for custom error message.
      Parameters:
      message - error message
  • Method Details