public class NotBlankValidator extends Object implements ConstraintValidator<NotBlank,CharSequence>
Constructor and Description |
---|
NotBlankValidator() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(NotBlank annotation) |
boolean |
isValid(CharSequence charSequence,
ConstraintValidatorContext constraintValidatorContext)
Checks that the trimmed string is not empty.
|
public void initialize(NotBlank annotation)
initialize
in interface ConstraintValidator<NotBlank,CharSequence>
public boolean isValid(CharSequence charSequence, ConstraintValidatorContext constraintValidatorContext)
isValid
in interface ConstraintValidator<NotBlank,CharSequence>
charSequence
- The character sequence to validate.constraintValidatorContext
- context in which the constraint is evaluated.true
if the string is null
or the length of charSequence
between the specified
min
and max
values (inclusive), false
otherwise.Copyright © 2007-2014 Red Hat Middleware, LLC. All Rights Reserved