Skip to content

Have access to request.app in Joi validation context #3451

Description

@cur3n4

Are you sure this is an issue with hapi or are you just looking for some help?

Yes.

What are you trying to achieve or the steps to reproduce?

Sometimes during Joi validation on a route, it is useful to have access to request.app to check some values. Currently the Joi validation context contains request headers, params, query, payload, and auth.

What did you expect?

I would expect to be able to access request.app in Joi, same as the other request attributes

Context

  • node version:7.2.1
  • hapi version:13.2.1
  • os:MacOS

Let me know if this change makes sense to you and I can try to do a PR.

Metadata

Metadata

Assignees

Labels

featureNew functionality or improvement

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions