public class SizeValidatorForCharSequence extends SizeValidator implements javax.validation.ConstraintValidator<javax.validation.constraints.Size,CharSequence>
max, min| Constructor and Description |
|---|
SizeValidatorForCharSequence() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isValid(CharSequence s,
javax.validation.ConstraintValidatorContext context)
Checks the length of the specified string.
|
initializepublic boolean isValid(CharSequence s, javax.validation.ConstraintValidatorContext context)
isValid in interface javax.validation.ConstraintValidator<javax.validation.constraints.Size,CharSequence>s - The string to validate.context - context in which the constraint is evaluated.true if the string is null or the length of s between the specified
min and max values (inclusive), false otherwise.Copyright © 2010–2022 The Apache Software Foundation. All rights reserved.