class-validator
class-validator copied to clipboard
feature: [question] would it be possible to add some whitelisted property names
Description
I have an app that injects some objects to the the incoming requests, this is proper behaviour (overrides in this place anything user might send - as its 3rd party data info). I want to be able to pass to the validation that i really like that property and it should not be stripped while using whitelisting.
Proposed solution
I thought about allowing usage of { whitelist: boolean | string[] }
where the string array is information which fields should not be stripped from the validated objects even if they are not directly declared in the classes of that objects itself