 typeof parameters[0] is string, must object to fix this issue: regex: ({ value, parameters }) => new RegExp(parameters[0]).test(value),