devextreme
Version:
JavaScript/TypeScript Component Suite for Responsive Web Development
31 lines (30 loc) • 1.84 kB
JavaScript
/**
* DevExtreme (cjs/__internal/scheduler/utils/options_validator/common/validator_rules.js)
* Version: 25.2.5
* Build date: Fri Feb 20 2026
*
* Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.mustBeLessThan = exports.mustBeInteger = exports.mustBeInRange = exports.mustBeGreaterThan = exports.mustBeDivisibleBy = void 0;
var _index = require("../core/index");
var _validation_functions = require("./validation_functions");
const mustBeInteger = exports.mustBeInteger = (0, _index.createValidatorRule)("mustBeInteger", (value => (0, _validation_functions.isInteger)(value)));
const mustBeGreaterThan = function(minimalValue) {
let strict = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : true;
return (0, _index.createValidatorRule)("mustBeGreaterThan", (value => (0, _validation_functions.greaterThan)(value, minimalValue, strict)))
};
exports.mustBeGreaterThan = mustBeGreaterThan;
const mustBeLessThan = function(maximalValue) {
let strict = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : true;
return (0, _index.createValidatorRule)("mustBeLessThan", (value => (0, _validation_functions.lessThan)(value, maximalValue, strict)))
};
exports.mustBeLessThan = mustBeLessThan;
const mustBeInRange = range => (0, _index.createValidatorRule)("mustBeInRange", (value => (0, _validation_functions.inRange)(value, range)));
exports.mustBeInRange = mustBeInRange;
const mustBeDivisibleBy = divider => (0, _index.createValidatorRule)("mustBeDivisibleBy", (value => (0, _validation_functions.divisibleBy)(value, divider)));
exports.mustBeDivisibleBy = mustBeDivisibleBy;