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('@hapi/joi'); const schema = Joi.object({ FundingSources: Joi.array().optional() .items( Joi.string().valid('All', 'Balance') ) .length(1) .default(['All']) }); console.log(schema.describe());
node_modules/@hapi/joi/lib/index.js:214 throw error; ^ ValidationError: { "type": "array", "flags": { "presence": "optional", "default" [1]: [ "All" ] }, "rules": [ { "name": "length", "args": { "limit": 1 } } ], "items": [ { "type": "string", "flags": { "only": true }, "allow": [ "All", "Balance" ] } ] } [1] "flags.default" must be one of [boolean, object, number, string, object, object, object, object, object, object, object, object]
Proper output of schema.describe().
The text was updated successfully, but these errors were encountered:
5c31cf9
hueniverse
No branches or pull requests
Context
What are you trying to achieve or the steps to reproduce ?
Which result you had ?
What did you expect ?
Proper output of schema.describe().
The text was updated successfully, but these errors were encountered: