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

Support [] as payload validation #3119

Closed
AdriVanHoudt opened this issue Apr 13, 2016 · 1 comment
Closed

Support [] as payload validation #3119

AdriVanHoudt opened this issue Apr 13, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@AdriVanHoudt
Copy link
Contributor

@AdriVanHoudt AdriVanHoudt commented Apr 13, 2016

regarding

payload: Joi.alternatives(Joi.object(), Joi.func()).allow(null, false, true),

now {} works instead of Joi.object() so I would expect [] to work instead of Joi.alternatives().try()
Joi will auto convert it to alternatives so it will work

This would be a trivial PR but still asking first ;)

@hueniverse
Copy link
Contributor

@hueniverse hueniverse commented Apr 13, 2016

Should be fine.

Loading

@hueniverse hueniverse added this to the 13.4.1 milestone May 21, 2016
@hueniverse hueniverse self-assigned this May 21, 2016
@Marsup Marsup added feature and removed request labels Sep 20, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 21, 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.

3 participants