Validation middleware with a reader bound to this middleware instance. The reader returns the parsed value only after this instance validates the request successfully and before another validator overwrites that target.
The parsed value produced by this validator
Read the parsed output produced by this validator for the current request.
The request context validated by this middleware instance
This instance's successfully validated output
If this validator has not run successfully or another validator has overwritten the same request target
const body = validateBody(Schema);router.post('/items', { middleware: [body], handler: (ctx) => ctx.response.json(body.value(ctx)),}); Copy
const body = validateBody(Schema);router.post('/items', { middleware: [body], handler: (ctx) => ctx.response.json(body.value(ctx)),});
0.10.0
Validation middleware with a reader bound to this middleware instance. The reader returns the parsed value only after this instance validates the request successfully and before another validator overwrites that target.