All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.bower_components.globalize.src.common.validate.parameter-range.js Maven / Gradle / Ivy

define([
    "../validate"
], function (validate) {

    /**
     * range( value, name, minimum, maximum )
     *
     * @value [Number].
     *
     * @name [String] name of variable.
     *
     * @minimum [Number]. The lowest valid value, inclusive.
     *
     * @maximum [Number]. The greatest valid value, inclusive.
     */
    return function (value, name, minimum, maximum) {
        validate(
            "E_PAR_OUT_OF_RANGE",
            "Parameter `{name}` has value `{value}` out of range [{minimum}, {maximum}].",
            value === undefined || value >= minimum && value <= maximum,
            {
                maximum: maximum,
                minimum: minimum,
                name: name,
                value: value
            }
        );
    };

});




© 2015 - 2025 Weber Informatics LLC | Privacy Policy