Skip to content

Commit

Permalink
Merge pull request #868 from RoberMac/patch-1
Browse files Browse the repository at this point in the history
Fix: `schema` can't call `validate()` method
  • Loading branch information
Marsup committed Apr 17, 2016
2 parents 93f9140 + ed983c7 commit 3a674c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ const schema = {
Marks a key to be removed from a resulting object or array after validation. Used to sanitize output.
```javascript
const schema = {
const schema = Joi.object({
username: Joi.string(),
password: Joi.string().strip()
};
});

schema.validate({ username: 'test', password: 'hunter2' }, (err, value) => {
// value = { username: 'test' }
Expand Down

0 comments on commit 3a674c3

Please sign in to comment.