}
return errors;
}
protected Set<ValidationError> validateNumericConstraint(final Field field, final Object object) {
final NumberConstraint numberConstraint = field.getAnnotation(NumberConstraint.class);
Set<ValidationError> errors = new HashSet<ValidationError>();
if (numberConstraint != null) {
if (numberConstraint.required() & (object == null)) errors.add(new ValidationError(field.getName(), errorCodes[0], numberConstraint, object));
if (object != null) {
double numericValue = ((Number) object).doubleValue();
if (numberConstraint.minValue() > numericValue) errors.add(new ValidationError(field.getName(), errorCodes[2], numberConstraint, object));
if (numberConstraint.maxValue() < numericValue) errors.add(new ValidationError(field.getName(), errorCodes[3], numberConstraint, object));
}
}
return errors;
}