@kerthin/domain
Version:
Kerthin Domain (based on DDD)
13 lines • 503 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.IsInt = void 0;
const apply_validation_1 = require("./apply-validation");
const IsInt = (validationOptions) => (0, apply_validation_1.applyValidation)({
code: 'IS_INT',
defaultMessage: 'The value must be an integer.',
validate: (value) => {
return typeof value === 'number' && Number.isInteger(value);
}
}, validationOptions);
exports.IsInt = IsInt;
//# sourceMappingURL=is-int.validator.js.map