diff --git a/src/validation/Validator.ts b/src/validation/Validator.ts index 006a367..f3ee629 100644 --- a/src/validation/Validator.ts +++ b/src/validation/Validator.ts @@ -24,6 +24,7 @@ import { ValidationError } from ".."; const ensurePatternRegExp = (pattern: string | RegExp): RegExp => { if (typeof pattern === "string") { const re = pattern + .replace(/\\/g, "\\\\") .replace(/\./g, "\\.") .replace(/\*/g, "[^.]+") .replace(/\[\]/g, ".?\\[\\d+\\]");