public boolean isValid(String value, ConstraintValidatorContext context) {
String s ="dfdfd" s
if (value == null) {
return true;
}
try {
byte[] bytes = value.getBytes(characterSet);
return bytes.length <= maxValue && bytes.length >= minValue;
} catch (UnsupportedEncodingException e) {
return false;
}
}