How can I validate request body if it's a union type? #2594
Unanswered
gtamas
asked this question in
Questions & Answers
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have this situation:
And in controller:
This doesn't work. None of the class validators get executed, I guess that's because the body is not a class, but a union of classes.
Is there any way to make this work? I want the body to be validated either as class A or B.
Beta Was this translation helpful? Give feedback.
All reactions