-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Joi.only is not a function #2111
Comments
Yes, it's not available on the root, only on the types. I see you took it from the documentation, it's fixed. |
thought so, thanks for the quick update! |
@Marsup but isn't .valid an alias of .any and .valid is present on the root |
Actually that's a fair point, my bad. |
I think I will change my code to use .valid on types only and not on root, coz future fixes for this issue might break my code, that makes sense ? |
You can do that in the meantime. I'll let @hueniverse see if my patch makes sense with his vision but other methods are there so pretty sure this one should too. Anyway you won't see a release immediately so it's best you move on with the longer form. |
much appreciated, thanks. |
|
missed to notice that in latest docs, thanks for clarification . |
Context
What are you trying to achieve or the steps to reproduce ?
Which result you had ?
TypeError: Joi.only is not a function
What did you expect ?
No exception
The text was updated successfully, but these errors were encountered: