You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `validate` function has support to check two request's fields: `query`and `body`. The first argument for this function should always be an object with the desired validation schemas.
130
+
The `validate` function has support to check the following request fields: `body`, `headers`and `query`. The first argument for this function should always be an object with the desired validation schemas.
130
131
131
132
#### `schemas`
132
133
@@ -140,6 +141,16 @@ Even if empty, this argument is required.
140
141
141
142
A valid `joi` schema.
142
143
144
+
##### `schemas.headers`
145
+
146
+
**Optional**
147
+
148
+
> Note: since most of the time you may receive more headers than expected, it is a good practice to make this
149
+
> schema always support [`unknown`](https://joi.dev/api/?v=17.3.0#objectunknownallow) keys. Otherwise, the validation
0 commit comments