Describe the bug
Class validator returns raw data instead of instance, making the option rawData useless. If you want to transform something, it transforms and uses it for the validation, but then the resolver returns the raw input values instead of the instance created by class-transformer.
To Reproduce
Steps to reproduce the behavior:
Setup a form with a class-validator resolver.
Use some options for the transformer.
Submit the form.
Check that the returned data is the raw input data, instead of the instance.
Expected behavior
It should return an instance instead of the raw data.
Additional context
PR for this bug following soon, please be advised that this will change the default behavior (right now it returns raw data, it'll start returning instances instead).
Describe the bug Class validator returns raw data instead of instance, making the option
rawData
useless. If you want to transform something, it transforms and uses it for the validation, but then the resolver returns the raw input values instead of the instance created by class-transformer.To Reproduce Steps to reproduce the behavior:
Codesandbox link (Required) https://codesandbox.io/s/laughing-hooks-n86nnj?file=/src/App.tsx
Expected behavior It should return an instance instead of the raw data.
Additional context PR for this bug following soon, please be advised that this will change the default behavior (right now it returns raw data, it'll start returning instances instead).