MichalLytek / class-transformer-validator

A simple plugin for class-transformer and class-validator which combines them in a nice and programmer-friendly API.
MIT License
200 stars 20 forks source link

Common decorators #24

Open XanderEmu opened 4 years ago

XanderEmu commented 4 years ago

How about extending this project with some new decorators that would make use of the fact that both libraries are available?

For example: instead of using @Type(() => Foo) and @IsInstance(Foo, {each: true}) and @IsArray() one could use a single decorator like @IsArrayOf(Foo) which would configure both class-transformer and class-validator with less code.