Implementation of query validation
guptaashwanee opened this issue · 0 comments
guptaashwanee commented
Is your feature request related to a problem? Please describe.
req.query is not not validated now, in req.query.populate if wrong string is passed which is not available in the mongoose schema it gives error
StrictPopulateError: Cannot populate path null
because it is not in your schema. Set the strictPopulate
option to false to override.
Describe the solution you'd like
We should plan to implement validation library as zod.
Describe alternatives you've considered
Write now I have implemented a custom validation of req.query through zod.