public function addValidationRule($field, $name, $type, $rule, array $parameters= array()) {
        $field = $this->getField($field);
        if (is_string($field)) {
            if (!$this->_validationLoaded) $this->_loadValidation();
            if (!isset($this->_validationRules[$field])) $this->_validationRules[$field]= array();
            $this->_validationRules[$field][$name]= array(
                'type' => $type,
                'rule' => $rule,
                'parameters' => array()
            );
            foreach ($parameters as $paramKey => $paramValue) {
                $this->_validationRules[$field][$name]['parameters'][$paramKey]= $paramValue;
            }
        }
    }