fluent-ts-validator
Version:
A fluent validator written in TypeScript
22 lines • 535 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Validates if given date is before specified date.
*
* @export
* @class IsBeforeValidator
* @implements {PropertyValidator<Date>}
*/
class IsBeforeValidator {
constructor(date) {
this.date = date;
}
isValid(input) {
if (input) {
return input.getTime() < this.date.getTime();
}
return false;
}
}
exports.IsBeforeValidator = IsBeforeValidator;
//# sourceMappingURL=IsBeforeValidator.js.map