fluent-ts-validator
Version:
A fluent validator written in TypeScript
22 lines • 575 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Validates if given number is greater than the threshold value.
*
* @export
* @class IsGreaterThanValidator
* @implements {PropertyValidator<number>}
*/
class IsGreaterThanValidator {
constructor(threshold) {
this.threshold = threshold;
}
isValid(input) {
if (input) {
return input > this.threshold;
}
return false;
}
}
exports.IsGreaterThanValidator = IsGreaterThanValidator;
//# sourceMappingURL=IsGreaterThanValidator.js.map