From 07dce125ef399edbb2caddca2e3d03ddc49f902a Mon Sep 17 00:00:00 2001 From: edward-whittle Date: Wed, 19 Feb 2020 14:26:31 +1100 Subject: [PATCH] Fix for Issue #171 --- lib/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/index.js b/lib/index.js index 4da6801..e38d226 100644 --- a/lib/index.js +++ b/lib/index.js @@ -67,6 +67,9 @@ const requireApi = function (path) { const register = async function (server, options, next) { + //Validator needs to be explicitly declared for Hapi v19.* + server.validator(require('joi')); + const validation = Joi.validate(options, optionsSchema); Hoek.assert(!validation.error, validation.error);