Update CUSTOM.md

Minor typo in the `custom` validate keyword example.
master
Cody De La Vara 2017-02-09 12:04:26 -05:00 committed by GitHub
parent 553aae8097
commit 9432451a84
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ Example. `constant` keyword from version 5 proposals (that is equivalent to `enu
```javascript
ajv.addKeyword('constant', { validate: function (schema, data) {
return typeof schema == 'object && schema !== null'
return typeof schema == 'object' && schema !== null
? deepEqual(schema, data)
: schema === data;
}, errors: false });