code: function onInvalidData(code, message, _statusCode) {
        var err = new Error();
        if(typeof message === 'undefined') {
          err.code = 'INVALID_DATA';
          err.message = code;
        } else {
          err.code = code;
          err.message = message;
        }
        if(typeof _statusCode === 'number') {
          err.statusCode = _statusCode;
        }
        function InvalidValidationWrapper() {
          return validateFunc.apply(this, arguments);
        }
        InvalidValidationWrapper.error = err;
        return InvalidValidationWrapper;
      }
docs: We also add a wrapper over each validation, to allow users to set custom error messages if a field is missing. Note: if the code contains spaces, we will consider it as the message and set the default code to 'MISSING_DATA'