Open pauloendoh opened 1 year ago
Since this package uses both class-validator and class-transformer, and many users complain on applying @Expose() on all fields in order to remove extraneous values, wouldn't it be possible to give an option to levarage the validation decorators?
Something like "excludeUnvalidatedFields"?
Or, perhaps, we could have something like @IsStringExpose(), that wraps both @IsString() and @Expose() ? I created this Gist as reference: https://gist.github.com/pauloendoh/f7d3194bae2ff121e78ce45589bd4ab2
I think not. This library is just a simple wrapper around those two, but adding additional decorators that changes behavior is out of scope I think.
Since this package uses both class-validator and class-transformer, and many users complain on applying @Expose() on all fields in order to remove extraneous values, wouldn't it be possible to give an option to levarage the validation decorators?
Something like "excludeUnvalidatedFields"?
Or, perhaps, we could have something like @IsStringExpose(), that wraps both @IsString() and @Expose() ? I created this Gist as reference: https://gist.github.com/pauloendoh/f7d3194bae2ff121e78ce45589bd4ab2