Skip to content

Commit

Permalink
fix: add a handler for regex object params closes #3073
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Dec 8, 2020
1 parent 4449c46 commit 7a5e2eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vee-validate/src/utils/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ function buildParams(provided: any[] | Record<string, any>) {
return provided.map(mapValueToLocator);
}

// #3073
if (provided instanceof RegExp) {
return [provided];
}

return Object.keys(provided).reduce((prev, key) => {
prev[key] = mapValueToLocator(provided[key]);

Expand Down

0 comments on commit 7a5e2eb

Please sign in to comment.