public class SizeValidatorForString extends SizeValidator implements javax.validation.ConstraintValidator<javax.validation.constraints.Size,String>
max, min| Constructor and Description |
|---|
SizeValidatorForString() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isValid(String s,
javax.validation.ConstraintValidatorContext context)
Checks the length of the specified string.
|
initializepublic boolean isValid(String s, javax.validation.ConstraintValidatorContext context)
isValid in interface javax.validation.ConstraintValidator<javax.validation.constraints.Size,String>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-2013 The Apache Software Foundation. All Rights Reserved.