private function fixMessages($messages, $name, $realName, $subName)
    {
        $toRemove = null;

        foreach ($messages as $messageRule => $message) {
            if (strpos($messageRule, $name.'.') !== false) {
                $toRemove = $messageRule;
                $messageRule = substr($messageRule, strpos($messageRule, '.') + 1);

                $messages[$realName.'_'.$subName.'.'.$messageRule] = $message;
            }
        }

        if (isset($toRemove)) {
            $this->messageKey = $toRemove;
        }

        return $messages;
    }
private function fixMessages($messages, $name, $realName, $subName)
    {
        $toRemove = null;

        foreach ($messages as $messageRule => $message) {
            if (strpos($messageRule, $name.'.') !== false) {
                $toRemove = $messageRule;
                $messageRule = substr($messageRule, strpos($messageRule, '.') + 1);

                $messages[$realName.'_'.$subName.'.'.$messageRule] = $message;
            }
        }

        if (isset($toRemove)) {
            $this->messageKey = $toRemove;
        }

        return $messages;
    }
private function fixMessages ( $ messages , $ name , $ realName , $ subName ) { $ toRemove = null ; foreach ( $ messages as $ messageRule => $ message ) { if ( strpos ( $ messageRule , $ name . '.' ) !== false ) { $ toRemove = $ messageRule ; $ messageRule = substr ( $ messageRule , strpos ( $ messageRule , '.' ) + 1 ) ; $ messages [ $ realName . '_' . $ subName . '.' . $ messageRule ] = $ message ; } } if ( isset ( $ toRemove ) ) { $ this -> messageKey = $ toRemove ; } return $ messages ; }
Fixes error messages to reflect subrules
names.

@param array $messages
@param string $name
@param string $realName
@param string $subName
@return array
Fixes error messages to reflect subrules names .