UNPKG

fluent-ts-validator

Version:
22 lines 674 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Validates if given number is greater than or equal to the threshold value. * * @export * @class IsGreaterThanOrEqualToValidator * @implements {PropertyValidator<number>} */ class IsGreaterThanOrEqualToValidator { constructor(threshold) { this.threshold = threshold; } isValid(input) { if (typeof input === "undefined" || input === null) { return false; } return input >= this.threshold; } } exports.IsGreaterThanOrEqualToValidator = IsGreaterThanOrEqualToValidator; //# sourceMappingURL=IsGreaterThanOrEqualToValidator.js.map