Skip to content

Commit 3a674c3

Browse files
committed
Merge pull request #868 from RoberMac/patch-1
Fix: `schema` can't call `validate()` method
2 parents 93f9140 + ed983c7 commit 3a674c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

API.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ const schema = {
318318
Marks a key to be removed from a resulting object or array after validation. Used to sanitize output.
319319
320320
```javascript
321-
const schema = {
321+
const schema = Joi.object({
322322
username: Joi.string(),
323323
password: Joi.string().strip()
324-
};
324+
});
325325

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

0 commit comments

Comments
 (0)