-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[zod-nestjs]: required fields in zod schema are optional in dto objects #188
Comments
I have the same issue I don't understand this behavior. |
Probably you are missing |
just checked it and it is set :( |
Looks like this could be fixed by #194 |
Looks like this is still broken. Everything is optional, which makes DTOs fairly pointless from a validation perspective. |
Anyone found a solution for this? Starting to doubt using this package now. |
solved it by adding : |
Hi,
considering the example
all fields in the schema are required but the dto has all fields optional. Why does createZodDto do it or how can I make createZodDto to keep required fields in dto?
Thanks,
Libor
The text was updated successfully, but these errors were encountered: