class-validator-extended
Version:
Additional validators for class-validator.
14 lines (13 loc) • 497 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.notMatches = notMatches;
const matches_1 = __importDefault(require("validator/lib/matches"));
function notMatches(value, pattern, modifiers) {
if (typeof value !== 'string') {
return false;
}
return !(0, matches_1.default)(value, pattern, modifiers);
}