Closed ekrresa closed 4 years ago
Are you asking for an option so that if there are validation errors in headers, body, and query that you want all of them reported together rather than failing fast on headers?
Yes, please. I would like that very much
+1 for this feature :pray:
+1
+1
+1
I've been thinking about this and it's a pretty big change. It would change the shape of the error object so that's breaking. Would the response be a object where the key
is the failed segment and the value
would be a CelebrateError
? That would be the value even with this disabled for consistency.
I've started working on this in #185. For those of you interested in this feature, check out my draft PR and leave any questions or concerns.
Anyone here interested in reviewing #185? I think it's ready to go.
I'm wondering if you could add an option for
celebrate
to get all possible errors before moving to the error handler. The current implementation renders theabortEarly
option fromJoi
redundant