diff --git a/source/basic.js b/source/basic.js index a13b46e..792d67f 100644 --- a/source/basic.js +++ b/source/basic.js @@ -1,4 +1,7 @@ ValidatorContext.prototype.validateBasic = function validateBasic(data, schema, dataPointerPath) { + if (data === undefined) { + return null; + } var error; if (error = this.validateType(data, schema, dataPointerPath)) { return error.prefixWith(null, "type");