Query array in input receive string if array is only one element ? #1388
-
There is pretty annoying things when I define zod array in the get method input(related to the query), when there is more than 1 element, the schema is working just fine, but if there is only 1 element, the schema have detect them as string and not an array, then my schema will fail and throw error :(. Can you provide me a fix for this @RobinTail ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @huyhoang160593 Please read this thread to find out how to encode arrays properly within query parameters, or for alternative ways of transformations: In case it does not solve your problem, please provide:
|
Beta Was this translation helpful? Give feedback.
Hello @huyhoang160593
Please read this thread to find out how to encode arrays properly within query parameters, or for alternative ways of transformations:
#1266 (comment)
In case it does not solve your problem, please provide: