protected function _validateDataKey($key, $data)
    {
        $dataOkFlag = true;

        if (!$this->_validationOn) {
            return $dataOkFlag;
        }

        foreach ($this->_validationRules as $ruleKey => $ruleValue) {
            if (!preg_match($ruleKey, $key)) {
                continue;
            }

            $bool = $this->_validateData($ruleValue, $key, $data);
            if (!$bool) {
                $dataOkFlag = false;
            }
        }

        return $dataOkFlag;
    }
protected function _validateDataKey($key, $data)
    {
        $dataOkFlag = true;

        if (!$this->_validationOn) {
            return $dataOkFlag;
        }

        foreach ($this->_validationRules as $ruleKey => $ruleValue) {
            if (!preg_match($ruleKey, $key)) {
                continue;
            }

            $bool = $this->_validateData($ruleValue, $key, $data);
            if (!$bool) {
                $dataOkFlag = false;
            }
        }

        return $dataOkFlag;
    }
protected function _validateDataKey ( $ key , $ data ) { $ dataOkFlag = true ; if ( ! $ this -> _validationOn ) { return $ dataOkFlag ; } foreach ( $ this -> _validationRules as $ ruleKey => $ ruleValue ) { if ( ! preg_match ( $ ruleKey , $ key ) ) { continue ; } $ bool = $ this -> _validateData ( $ ruleValue , $ key , $ data ) ; if ( ! $ bool ) { $ dataOkFlag = false ; } } return $ dataOkFlag ; }
search validation rule for given key and check data

@param string $key
@param mixed $data
@return bool
search validation rule for given key and check data