public class NotBlankValidator extends Object implements ConstraintValidator<NotBlank,CharSequence>
null
nor empty after removing any leading or trailing whitespace.Constructor and Description |
---|
NotBlankValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
isValid(CharSequence charSequence,
ConstraintValidatorContext constraintValidatorContext)
Checks that the character sequence is not
null nor empty after removing any leading or trailing
whitespace. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialize
public boolean isValid(CharSequence charSequence, ConstraintValidatorContext constraintValidatorContext)
null
nor empty after removing any leading or trailing
whitespace.isValid
in interface ConstraintValidator<NotBlank,CharSequence>
charSequence
- the character sequence to validateconstraintValidatorContext
- context in which the constraint is evaluatedtrue
if the string is not null
and the length of the trimmed
charSequence
is strictly superior to 0, false
otherwiseCopyright © 2019 JBoss by Red Hat. All rights reserved.