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
const Joi = require("joi"); const baseArray = Joi.object().keys({ key: Joi.array() .min(2) .required() .items(Joi.object().keys({ a: Joi.string() })) }); const extended = baseArray.keys({ key: Joi.reach(baseArray, "key").min(1) }); const value = { key: [{ a: "toto" }] }; await Joi.validate(value, extended);
Runkit to reproduce the problem.
It throws saying that the key array expects 2 items whereas I overrided it for a .min(1).
key
.min(1)
I was expecting the override to work and the validation to pass.
The text was updated successfully, but these errors were encountered:
Duplicate of #1127.
Sorry, something went wrong.
Marsup
No branches or pull requests
Context
What are you trying to achieve or the steps to reproduce ?
Runkit to reproduce the problem.
Which result you had ?
It throws saying that the
key
array expects 2 items whereas I overrided it for a.min(1)
.What did you expect ?
I was expecting the override to work and the validation to pass.
The text was updated successfully, but these errors were encountered: