Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose cross inputs as validation context #1643

Closed
hueniverse opened this issue May 18, 2014 · 0 comments
Closed

Expose cross inputs as validation context #1643

hueniverse opened this issue May 18, 2014 · 0 comments
Assignees
Labels
Milestone

Comments

@hueniverse
Copy link
Contributor

@hueniverse hueniverse commented May 18, 2014

var server = new Hapi.Server();
server.route({
  method: 'GET',
  path: '/{user?}',
  handler: function (request, reply) { reply('ok'); },
  config: {
    validate: {
      query: {
        verbose: Joi.boolean().when('$param.user', { is: Joi.exist(), otherwise: Joi.forbidden() })
      }
    }
  }
});
@hueniverse hueniverse added this to the 5.0.0 milestone May 18, 2014
@hueniverse hueniverse self-assigned this May 18, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jan 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant