From 9432451a844d54f4aaa6d6b03ff7dcadad0a37b8 Mon Sep 17 00:00:00 2001 From: Cody De La Vara Date: Thu, 9 Feb 2017 12:04:26 -0500 Subject: [PATCH] Update CUSTOM.md Minor typo in the `custom` validate keyword example. --- CUSTOM.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CUSTOM.md b/CUSTOM.md index e5f9cf5..97c37f4 100644 --- a/CUSTOM.md +++ b/CUSTOM.md @@ -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 });