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

[7.x] [feat] add reach-like functionality to object (#37118) #37139

Merged
merged 1 commit into from
May 28, 2019

Conversation

toddself
Copy link
Contributor

Backports the following commits to 7.x:

* [feat] add reach-like functionality to object

In elastic#36804 we need to validate a `Partial<HttpConfig>` object which may
or may not have all the required keys attached to it.  This is the type
of use-case for `Joi.reach`, so we should expose a reach-like method on
the object validation class so that you can return the validator for a
specific key on an object.

* [fix] change to validateKey

* [fix] use throw error matcher

* [fix] use same interface for validate

* [fix] change test name]
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@toddself toddself merged commit 00ee700 into elastic:7.x May 28, 2019
@toddself toddself deleted the backport/7.x/pr-37118 branch May 28, 2019 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants