code: function documentFactory(validators) {
      function documentValidator(doc, attr, debug) {
        doc = doc || {};
        attr = attr || {};
        
        var errors = [];
  
        _.each(validators, function (valset, field) {
          var err = null;
          var value = doc[field];
  
          // turn validators into an array if it isn't one
          valset = _.arrayify(valset);
  
          // run all the validation for this field
          _.each(valset, function (validator) {
  
            // if there's already an error, don't bother
            if (err) return;
            err = validator(value, attr, (field == 'badge'));
  
          });
  
          // set the correct field on the error
          if (err) err.field = field;
  
          // jam it into the array with the rest of 'em
          errors.push(err);
        });
  
        // throw out any undefined or nulls that snuck in there
        errors = _.reject(errors, _.isMissing);
  
        if (errors.length) {
          return { name: 'doc', errors: errors };
        }
      }
      documentValidator.meta = { name : 'doc' };
      return documentValidator;
    }
docs: `validators` is an object where each property is a potential array of validation functions (including, maybe, a call to this method)