Skip to content

Commit

Permalink
Update documentation to match the API
Browse files Browse the repository at this point in the history
  • Loading branch information
ruiquelhas committed Nov 6, 2017
1 parent 9f2b9a7 commit 1024c12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -6,7 +6,7 @@ Route-level file type validation for [hapi](https://github.com/hapijs/hapi) pars
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [`validate(payload, options, fn)`](#validatepayload-options-fn)
- [`validate(payload, options)`](#validatepayload-options)
- [Hapi](#hapi)
- [Standalone](#standalone)
- [Supported File Types](#supported-file-types)
Expand All @@ -19,8 +19,8 @@ $ npm install houdin
```

## Usage
### `validate(payload, options, fn)`
Validates all `Buffer` values in a `payload` given a `whitelist` of file types provided in the `options`. Results in a [joi](https://github.com/hapijs/joi)-like `ValidationError` if some file type is not allowed or unknown otherwise it returns the original parsed payload to account for additional custom validation.
### `validate(payload, options)`
Validates all `Buffer` values in a `payload` given a `whitelist` of file types provided in the `options`. Throws a [joi](https://github.com/hapijs/joi)-like `ValidationError` if some file type is not allowed or unknown otherwise it returns the original payload.

#### Hapi

Expand Down

0 comments on commit 1024c12

Please sign in to comment.