UNPKG

custom-automapper

Version:

A powerful, type-safe object mapping library for TypeScript and NestJS

12 lines 399 B
"use strict"; 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