public class NotBlankValidator extends java.lang.Object implements javax.validation.ConstraintValidator<NotBlank,java.lang.CharSequence>
Validator for the NotBlank
annotation.
NotBlank}
Constructor and Description |
---|
NotBlankValidator() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(NotBlank annotation)
Initialize.
|
boolean |
isValid(java.lang.CharSequence charSequence,
javax.validation.ConstraintValidatorContext constraintValidatorContext)
Checks that the trimmed string is not Blank.
|
public NotBlankValidator()
public void initialize(NotBlank annotation)
Initialize.
initialize
in interface javax.validation.ConstraintValidator<NotBlank,java.lang.CharSequence>
annotation
- the annotationpublic boolean isValid(java.lang.CharSequence charSequence, javax.validation.ConstraintValidatorContext constraintValidatorContext)
Checks that the trimmed string is not Blank.
isValid
in interface javax.validation.ConstraintValidator<NotBlank,java.lang.CharSequence>
charSequence
- The character sequence to validate.constraintValidatorContext
- context in which the constraint is evaluated.Copyright © 2014-2018 Konik.io. All Rights Reserved.