+ objAttribute.getName()
+ "\" exceeds maximum allowed length ("
+ dbAttribute.getMaxLength()
+ " bytes): "
+ len;
validationResult.addFailure(new BeanValidationFailure(
this,
objAttribute.getName(),
message));
}
}
else if (value instanceof CharSequence) {
int len = ((CharSequence) value).length();
if (len > dbAttribute.getMaxLength()) {
String message = "\""
+ objAttribute.getName()
+ "\" exceeds maximum allowed length ("
+ dbAttribute.getMaxLength()
+ " chars): "
+ len;
validationResult.addFailure(new BeanValidationFailure(
this,
objAttribute.getName(),
message));
}
}