public static function createRule($type, HTML_QuickForm2_Node $owner,
                                      $message = '', $config = null)
    {
        $type = strtolower($type);
        if (!isset(self::$registeredRules[$type])) {
            throw new HTML_QuickForm2_InvalidArgumentException("Rule '$type' is not known");
        }
        list($className, $includeFile) = self::$registeredRules[$type];
        if (!class_exists($className)) {
            HTML_QuickForm2_Loader::loadClass($className, $includeFile);
        }
        if (isset(self::$registeredRules[$type][2])) {
            $config = call_user_func(array($className, 'mergeConfig'), $config,
                                     self::$registeredRules[$type][2]);
        }
        return new $className($owner, $message, $config);
    }