UNPKG

devextreme

Version:

JavaScript/TypeScript Component Suite for Responsive Web Development

30 lines (29 loc) 1.33 kB
/** * DevExtreme (esm/__internal/scheduler/utils/options_validator/common/validator_rules.js) * Version: 25.2.7 * Build date: Tue May 05 2026 * * Copyright (c) 2012 - 2026 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { createValidatorRule } from "../core/index"; import { divisibleBy, greaterThan, inRange, isInteger, lessThan } from "./validation_functions"; export const mustBeInteger = createValidatorRule("mustBeInteger", value => isInteger(value)); export const mustBeGreaterThan = function(minimalValue) { let strict = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : true; return createValidatorRule("mustBeGreaterThan", value => greaterThan(value, minimalValue, strict)) }; export const mustBeLessThan = function(maximalValue) { let strict = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : true; return createValidatorRule("mustBeLessThan", value => lessThan(value, maximalValue, strict)) }; export const mustBeInRange = range => createValidatorRule("mustBeInRange", value => inRange(value, range)); export const mustBeDivisibleBy = divider => createValidatorRule("mustBeDivisibleBy", value => divisibleBy(value, divider));