@@ -182,7 +182,7 @@ export class ValidationExecutor {
182
182
}
183
183
184
184
this . customValidations ( object , value , customValidationMetadatas , validationError ) ;
185
- this . nestedValidations ( value , nestedValidationMetadatas , validationError . children , definedMetadatas , metadatas ) ;
185
+ this . nestedValidations ( value , nestedValidationMetadatas , validationError . children ) ;
186
186
187
187
this . mapContexts ( object , value , metadatas , validationError ) ;
188
188
this . mapContexts ( object , value , customValidationMetadatas , validationError ) ;
@@ -304,8 +304,7 @@ export class ValidationExecutor {
304
304
} ) ;
305
305
}
306
306
307
- private nestedValidations ( value : any , metadatas : ValidationMetadata [ ] , errors : ValidationError [ ] ,
308
- definedMetadatas : ValidationMetadata [ ] , allMetadatas : ValidationMetadata [ ] ) {
307
+ private nestedValidations ( value : any , metadatas : ValidationMetadata [ ] , errors : ValidationError [ ] ) {
309
308
310
309
if ( value === void 0 ) {
311
310
return ;
@@ -323,8 +322,9 @@ export class ValidationExecutor {
323
322
// Treats Set as an array - as index of Set value is value itself and it is common case to have Object as value
324
323
const arrayLikeValue = value instanceof Set ? Array . from ( value ) : value ;
325
324
arrayLikeValue . forEach ( ( subValue : any , index : any ) => {
326
- this . performValidations ( value , subValue , index . toString ( ) , definedMetadatas , allMetadatas , errors ) ;
325
+ this . performValidations ( value , subValue , index . toString ( ) , [ ] , metadatas , errors ) ;
327
326
} ) ;
327
+
328
328
} else if ( value instanceof Object ) {
329
329
const targetSchema = typeof metadata . target === "string" ? metadata . target as string : metadata . target . name ;
330
330
this . execute ( value , targetSchema , errors ) ;
0 commit comments