/** * Checks if the value is less than or equal to the max. */ public boolean maxValue(long val, long maxVal) { return GenericValidator.maxValue(val, maxVal); }
/** * Checks if the value is less than or equal to the max. */ public boolean maxValue(double val, double maxVal) { return GenericValidator.maxValue(val, maxVal); }
/** * Checks if the value is less than or equal to the max. */ public boolean maxValue(int val, int maxVal) { return GenericValidator.maxValue(val, maxVal); }
/** * Checks if the value is less than or equal to the max. */ public boolean maxValue(float val, float maxVal) { return GenericValidator.maxValue(val, maxVal); }
!GenericValidator.maxValue((int) Integer.parseInt(valueToValidate),(int) question.getIntegerMaximum()) ) { errors.rejectValue(validationFieldName, "field_value_max", new Object[] {question.getIntegerMaximum()}, "The value of this field must not exceed " + question.getIntegerMaximum()); !GenericValidator.maxValue((double) Double.parseDouble(valueToValidate),question.getDecimalMaximum().doubleValue()) ) { errors.rejectValue(validationFieldName, "field_value_max", new Object[] {question.getDecimalMaximum()}, "The value of this field must not exceed " + question.getDecimalMaximum()); !GenericValidator.maxValue((double) Double.parseDouble(valueToValidate),question.getDecimalMaximum().doubleValue()) ) { errors.rejectValue(validationFieldName, "field_value_max", new Object[] {question.getDecimalMaximum()}, "The value of this field must not exceed " + question.getDecimalMaximum()); !GenericValidator.maxValue((int) Integer.parseInt(valueToValidate),(int) question.getIntegerMaximum()) ) { errors.rejectValue(validationFieldName, "field_value_max", new Object[] {question.getIntegerMaximum()}, "The value of this field must not exceed " + question.getIntegerMaximum()); !GenericValidator.maxValue((double) Double.parseDouble(valueToValidate),question.getDecimalMaximum().doubleValue()) ) { System.out.println(validationFieldName + "MAX ########################################################################################################"); !GenericValidator.maxValue((double) Double.parseDouble(valueToValidate),question.getDecimalMaximum().doubleValue()) ) { errors.rejectValue(validationFieldName, "field_value_max", new Object[] {question.getDecimalMaximum()}, "The value of this field must not exceed " + question.getDecimalMaximum());