code: function validate(config, source) {
  
    if (typeof config.rules === 'object') {
      Object.keys(config.rules).forEach(function(id) {
        validateRuleOptions(id, config.rules[id], source);
      });
    }
  }
docs: Validates an entire config object.
  @param {object} config The config object to validate.
  @param {string} source The location to report with any errors.
  @returns {void}