Skip to content

Commit

Permalink
Update API.md - valid() no longer takes arrays
Browse files Browse the repository at this point in the history
Ensure documentation example reflects that method valid() no longer takes arrays as a parameter.
  • Loading branch information
cbebry committed Feb 27, 2020
1 parent 6ec7131 commit d9738fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ Returns an object that represents the internal configuration of the schema. Usef
and exposing a schema's configuration to other systems, like valid values in a user interface.

```js
const schema = Joi.any().valid([ 'foo', 'bar' ]);
const schema = Joi.any().valid('foo', 'bar');
console.log(schema.describe());
```

Expand Down

0 comments on commit d9738fb

Please sign in to comment.