Open BriungRi opened 2 weeks ago
Currently, querystring can accept something like
querystring
z.object({ name: z.string(), age: z.number(), });
which will always fail the validation because all parameters from querystring are string type.
string
A few ideas:
number
Currently,
querystring
can accept something likewhich will always fail the validation because all parameters from
querystring
arestring
type.A few ideas:
querystring
only, if anumber
is expected, parse the string into a number and then do zod validationquerystring
typequerystring
type by throwing an error for invalid type