docs: function validate(key, values) {
    var typedef, value;
  
    if(!~Keys.indexOf(key)) {
      throw new Error('unknown configuration key: ' + key);
    }
  
    // retrieve the type definition
    typedef = Types[key];
  
    // validate on the typedef
    try {
      value = typedef.validate(key, values);
    }catch(e) {
      // got a more specific error message to throw
      if(typeof validator[key] === 'object'
        && validator[key].error) {
        throw validator[key].error;
      }
      throw e;
    }
  
    return value;
  }