Skip to content

Commit 845e233

Browse files
committed
Merge pull request #10 from gtarcea/issue_9_custom_rules
Resolves issue #9 with same rules with different arguments getting overwritten
2 parents 823b2fb + 9d0d98a commit 845e233

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function _executeRules(options, value, key, prefix, errors, deepQueue, ruleQueue
9999
let rule = _this.parent.rules[ruleKey] || defaultRules[ruleKey];
100100
// Asynchronous rules get added to the queue
101101
if (rule.async) {
102-
ruleQueue[ruleKey] = ((r, key, val, rVal) => {
102+
ruleQueue[ruleKey + '_' + ruleValue] = ((r, key, val, rVal) => {
103103
return next => {
104104
r(val, rVal, err => {
105105
next(null, { err: err, key: key });

0 commit comments

Comments
 (0)