#DTO. Decorator's conditions
4 messages · Page 1 of 1 (latest)
There's ValidateIf. But it's not for either or validations like it seems you want
@inland jay
You can write a custom decorator that checks the type of the input data.
More about that:
https://github.com/typestack/class-validator#custom-validation-decorators
For instance, you may have @IsColor() decorator