We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
node.js
20
17.11.0
No response
Is there a way to use .allow() specifically to allow an array, e.g.:
.allow()
Joi.string().allow(['a']) // should allow any string and ['a'] // throws Uncaught Error: Method no longer accepts array arguments: allow
I can work around this by using alternatives or conditions, but I don't understand why allow does not accept arrays.
The text was updated successfully, but these errors were encountered:
If you need to allow different schemas, you can use alternative(). Docs
alternative()
Sorry, something went wrong.
allow is there to compare pure values, the moment you need to compare complex objects, you probably need schemas.
allow
No branches or pull requests
Runtime
node.js
Runtime version
20
Module version
17.11.0
Used with
No response
Any other relevant information
No response
How can we help?
Is there a way to use
.allow()
specifically to allow an array, e.g.:I can work around this by using alternatives or conditions, but I don't understand why allow does not accept arrays.
The text was updated successfully, but these errors were encountered: