Skip to content

Commit e5dbc2e

Browse files
committed
fix variable name typo
1 parent 8582aef commit e5dbc2e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/validator.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Validator {
7676
}
7777

7878
if (opts.customFunctions) {
79-
for (const customeName in opts.customFunctions) this.addCustomFunction(customeName, opts.customFunctions[customeName]);
79+
for (const customName in opts.customFunctions) this.addCustomFunction(customName, opts.customFunctions[customName]);
8080
}
8181

8282
if (opts.plugins) {
@@ -445,7 +445,7 @@ class Validator {
445445
makeCustomValidator({ vName = "value", fnName = "custom", ruleIndex, path, schema, context, messages }) {
446446
const ruleVName = "rule" + ruleIndex;
447447
const fnCustomErrorsVName = "fnCustomErrors" + ruleIndex;
448-
448+
449449
if (typeof schema[fnName] == "function" || (Array.isArray(schema[fnName]))) {
450450
if (context.customs[ruleIndex]) {
451451
context.customs[ruleIndex].messages = messages;
@@ -462,9 +462,9 @@ class Validator {
462462

463463
if(Array.isArray(schema[fnName])){
464464
for (let i = 0; i < schema[fnName].length; i++) {
465-
465+
466466
let custom = schema[fnName][i];
467-
467+
468468
if (typeof custom === "string") {
469469
custom = this.parseShortHand(custom);
470470
schema[fnName][i] = custom;
@@ -475,9 +475,9 @@ class Validator {
475475

476476
ret.push( `
477477
const ${ruleVName}_${i} = context.customs[${customIndex}];
478-
478+
479479
`);
480-
480+
481481
if(custom.type){
482482
ret.push( `
483483
${vName} = ${context.async ? "await " : ""}context.customFunctions[${ruleVName}.schema.${fnName}[${i}].type].call(this, ${vName}, ${fnCustomErrorsVName} , ${ruleVName}_${i}.schema, "${path}", parent, context);

0 commit comments

Comments
 (0)