custom-automapper
Version:
A powerful, type-safe object mapping library for TypeScript and NestJS
12 lines • 399 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateProperty = validateProperty;
async function validateProperty(value, rules) {
for (const rule of rules) {
const isValid = await Promise.resolve(rule.validate(value));
if (!isValid) {
throw new Error(rule.message);
}
}
}
//# sourceMappingURL=validation.util.js.map