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
@mib4fun we miss some useful options with the validate feature :
errorFields - an optional object with error fields copied into every validation error response.
failAction - determines how to handle invalid requests. Allowed values are:
'error' - return a Bad Request (400) error response. This is the default value.
'log' - log the error but continue processing the request.
'ignore' - take no action.
a custom error handler function with the signature function(request, reply, source, error) where:
request - the request object.
reply - the continuation reply interface.
source - the source of the invalid field (e.g. 'headers', 'params', 'query', 'payload').
error - the error object prepared for the client response (including the validation function error under error.data).
options - options to pass to Joi. Useful to set global options such as stripUnknown or abortEarly (the complete list is available here). Defaults to no options.
@mib4fun we miss some useful options with the
validate
feature :http://hapijs.com/api#route-options
If you don't have time to do it this is not a problem I just want to let you know ^^
Also need unit tests about these new fields.
The text was updated successfully, but these errors were encountered: