Skip to content

Commit

Permalink
[server-validator-docs] Improve server.validator() documentation to c…
Browse files Browse the repository at this point in the history
…larify it's usage inside plugins
  • Loading branch information
jonathansamines committed Apr 22, 2020
1 parent fa76016 commit 07c95da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion API.md
Expand Up @@ -2600,7 +2600,7 @@ Registers a server validation module used to compile raw validation rules into v

Return value: none.

Note: the validator is only used when validation rules are not pre-compiled schemas. When a validation rules is a function or schema object, the rule is used as-is and the validator is not used.
Note: the validator is only used when validation rules are not pre-compiled schemas. When a validation rules is a function or schema object, the rule is used as-is and the validator is not used. Note that setting a validator inside a plugin, will cause the validator to only be applied to routes set up by the plugin.

```js
const Hapi = require('@hapi/hapi');
Expand Down

0 comments on commit 07c95da

Please sign in to comment.