Determine if the input int parameter is lower than max. if yes, the check passes

@param max input must be < max number
@param msg error message after verification failed
@return Validation
422349
public static Validation<Integer> lowerThan(int max, String msg) {
        return SimpleValidation.from((i) -> i < max, format(msg, max));
    }
321854
function validatorNum( msg ) {
		return function() {
			var value = this.getValue(),
				pass = !!( CKEDITOR.dialog.validate.integer()( value ) && value > 0 );

			if ( !pass ) {
				alert( msg );
				this.select();
			}

			return pass;
		};
	}
862341
public static String validateNumber(String value, String errorMsg) throws ValidateException {
		if (false == isNumber(value)) {
			throw new ValidateException(errorMsg);
		}
		return value;
	}
1022787
public boolean verify(JComponent input) {
        JTextField tf = (JTextField) input;
        try {
            int inputInt = Integer.parseInt(tf.getText());
            return (inputInt >= min && inputInt <= max);
        } catch (NumberFormatException e) {
            return false;
        }
    }
646020
public ValidatorBuilderBigInteger<PARENT> range(BigInteger min, BigInteger max) {

    return range(new Range<>(min, max));
  }
856590
public static ValidationStatus getInfoMsgLevel(final String msg) {
    if (msg.startsWith("ERROR")) {
      return ValidationStatus.ERROR;
    }
    if (msg.startsWith("WARN")) {
      return ValidationStatus.WARN;
    }
    return ValidationStatus.PASS;
  }
919979
private void verifyNumber(Number value, Number minimum, Number maximum) {

    if (minimum != null) {
      if (maximum != null) {
        assert ((value.doubleValue() >= minimum.doubleValue()) || (value.doubleValue() <= maximum.doubleValue()));
      } else {
        assert (value.doubleValue() >= minimum.doubleValue());
      }
    } else if (maximum != null) {
      assert (value.doubleValue() <= maximum.doubleValue());
    } else {
      throw new NlsNullPointerException("minimum & maximum");
    }
  }
534289
public FormInputValidator integerNumber (VisValidatableTextField field, String errorMsg) {
		ValidatorWrapper wrapper = new ValidatorWrapper(errorMsg, Validators.INTEGERS);
		field.addValidator(wrapper);
		add(field);
		return wrapper;
	}
26901
public static <T extends CharSequence> T validateMobile(T value, String errorMsg) throws ValidateException {
		if (false == isMobile(value)) {
			throw new ValidateException(errorMsg);
		}
		return value;
	}
1009955
public void expectMax(String name, double maxLength, String message) {
        String value = Optional.ofNullable(get(name)).orElse("");

        if (StringUtils.isNumeric(value)) {
            if (Double.parseDouble(value) > maxLength) {
                addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.MAX_KEY.name(), name, maxLength)));
            }
        } else {
            if (value.length() > maxLength) {
                addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.MAX_KEY.name(), name, maxLength)));
            }
        }
    }
433306
public static Validation<String> moreThan(int size, String msg) {
        return notEmpty().and(SimpleValidation.from((s) -> s.length() >= size, format(msg, size)));
    }
605272
public ValidatorBuilderInteger<PARENT> range(int min, int max) {

    return range(new Range<>(Integer.valueOf(min), Integer.valueOf(max)));
  }
901024
@Override
    public boolean isValid(Object input) {
        long epochMillisec;
        try {
            epochMillisec = Long.parseLong(input.toString());
        } catch (NumberFormatException e) {
            return false;
        }

        if (minValidTime != null && epochMillisec < minValidTime)
            return false;
        return !(maxValidTime != null && epochMillisec > maxValidTime);
    }
892619
def validate(self, value: int):
        '''  '''
        if not isinstance(value, int):
            raise ValueError('value is not an integer')

        if self.minimum > value or self.maximum < value:
            msg = (
                '{} is outside the valide range [{},{}]'
            ).format(value, self.minimum, self.maximum)
            raise ValueError(msg)
40333
public static String validate(String value, int min, int max) {
        if (min == max) {
            return validate(value, min);
        }
        if ((value.length() < min) || (value.length() > max)) {
            throw new InvalidLengthException(value, min, max);
        }
        return value;
    }
478840
public static Integer validateInteger(final String context,
			final String input, final int minValue, final int maxValue,
			final boolean allowNull) throws ValidationException {
		return validator.getValidInteger(context, input, minValue, maxValue,
				allowNull);
	}
918645
protected function validate_int( $var, $min = null, $max = null ) {
		if ( ! is_int( $var ) && ! is_string( $var ) && empty( $var ) ) {
			return new \WP_Error( 400, $this->app->translate( 'Value is required.' ) );
		}
		if ( ! is_int( $var ) && ( ! is_string( $var ) || ! preg_match( '#\A-?\d+\z#', $var ) ) ) {
			return new \WP_Error( 400, $this->app->translate( 'Invalid format.' ) );
		}
		if ( isset( $min ) && $var < $min ) {
			return new \WP_Error( 400, $this->app->translate( 'Outside the range of allowed values.' ) );
		}
		if ( isset( $max ) && $var > $max ) {
			return new \WP_Error( 400, $this->app->translate( 'Outside the range of allowed values.' ) );
		}

		return true;
	}