arb / celebrate

A joi validation middleware for Express.
MIT License
1.33k stars 66 forks source link

Ignore unused query parameters instead of throwing error #153

Closed vedantroy closed 4 years ago

vedantroy commented 4 years ago

How do I allow the query string to have extra query parameters? Right now errors are thrown if there are too many query string parameters?

vedantroy commented 4 years ago

Nevermind, I figured it out.

    [Segments.QUERY]: Joi.object({
        minReacts: Joi.number().min(0)
    }).options({stripUnknown: true})