class-transformer icon indicating copy to clipboard operation
class-transformer copied to clipboard

fix: excludeExtraneousValues doesn't work with arrays

Open kirill-kostenetskyi opened this issue 5 years ago • 3 comments

let results: TypedModel[] = plainToClass(TypedModel, res, { excludeExtraneousValues: true });

Once res is array of items, the results array will contains item which is not exist in model schema. Is this correct behavior?

kirill-kostenetskyi avatar Sep 08 '19 04:09 kirill-kostenetskyi

+1

tjhiggins avatar Jul 29 '20 21:07 tjhiggins

+1

same issue with exposeDefaultValues

charliefancelli avatar Mar 26 '21 17:03 charliefancelli

We are facing the same issue too

fgodino-milu avatar Aug 10 '23 10:08 fgodino-milu