diff --git a/src/validate.ts b/src/validate.ts index 3bac21dd7..a9650755b 100644 --- a/src/validate.ts +++ b/src/validate.ts @@ -295,7 +295,7 @@ function _buildParams( let definedRules: RuleParamConfig[]; // collect the params schema. - if (!defined || defined.length < provided.length) { + if (!defined || (defined.length < provided.length && Array.isArray(provided))) { let lastDefinedParam: RuleParamConfig; // collect any additional parameters in the last item. definedRules = provided.map((_: any, idx: number) => {