public class NotBlankValidator extends java.lang.Object implements javax.validation.ConstraintValidator<NotBlank,java.lang.CharSequence>
Constructor and Description |
---|
NotBlankValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
isValid(java.lang.CharSequence charSequence,
javax.validation.ConstraintValidatorContext constraintValidatorContext)
Checks that the trimmed string is not empty.
|
public boolean isValid(java.lang.CharSequence charSequence, javax.validation.ConstraintValidatorContext constraintValidatorContext)
isValid
in interface javax.validation.ConstraintValidator<NotBlank,java.lang.CharSequence>
charSequence
- the character sequence to validateconstraintValidatorContext
- context in which the constraint is evaluatedtrue
if the string is null
or the length of the trimmed
charSequence
is strictly superior to 0, false
otherwiseCopyright © 2007-2022 Red Hat, Inc. All Rights Reserved