UNPKG

epic-validator

Version:
14 lines (13 loc) 557 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Validation = void 0; const chain_1 = require("./chain"); class Validation { constructor(CustomValidators) { this.CustomValidators = CustomValidators; this.validate = (target, identifier) => new chain_1.ValidationChain(this.CustomValidators, target, identifier); if (typeof this.CustomValidators !== "object") throw new Error("Please provide a valid Custom Validators object!"); } } exports.Validation = Validation;