code: function (validator) {
      if (!_.isFunction(validator)) {
        var err = new Error('Please pass in a function');
        debug(err);
        throw err;
      }
      if (validator.length == 2) {
        return this.validator = validator;
      }
  
      this.validator = function (data, callback) {
        callback(validator(data));
      };
  
      return this.validator;
    }
docs: Injects the validator function.
  @param {Function} validator The validator function that should be injected