protected function getMessage($key, $ruleName, array $keyRules, array $keyTitles, array $customMessages = [])
    {

        if (in_array($ruleName, $this->sizeRules)) {
            return $this->getSizeMessage($key, $ruleName, $keyRules, $keyTitles, $customMessages);
        }

        if ($customMessage = $this->getCustomMessage($key, $ruleName, $customMessages)) {
            return $customMessage;
        }

        $replacements = $this->replacements($ruleName, $keyRules);

        $replacements['attribute'] = isset($keyTitles[$key]) ? $keyTitles[$key] : $key;

        return $this->textProvider->get($ruleName, $replacements);

    }
protected function getMessage($key, $ruleName, array $keyRules, array $keyTitles, array $customMessages = [])
    {

        if (in_array($ruleName, $this->sizeRules)) {
            return $this->getSizeMessage($key, $ruleName, $keyRules, $keyTitles, $customMessages);
        }

        if ($customMessage = $this->getCustomMessage($key, $ruleName, $customMessages)) {
            return $customMessage;
        }

        $replacements = $this->replacements($ruleName, $keyRules);

        $replacements['attribute'] = isset($keyTitles[$key]) ? $keyTitles[$key] : $key;

        return $this->textProvider->get($ruleName, $replacements);

    }
protected function getMessage ( $ key , $ ruleName , array $ keyRules , array $ keyTitles , array $ customMessages = [ ] ) { if ( in_array ( $ ruleName , $ this -> sizeRules ) ) { return $ this -> getSizeMessage ( $ key , $ ruleName , $ keyRules , $ keyTitles , $ customMessages ) ; } if ( $ customMessage = $ this -> getCustomMessage ( $ key , $ ruleName , $ customMessages ) ) { return $ customMessage ; } $ replacements = $ this -> replacements ( $ ruleName , $ keyRules ) ; $ replacements [ 'attribute' ] = isset ( $ keyTitles [ $ key ] ) ? $ keyTitles [ $ key ] : $ key ; return $ this -> textProvider -> get ( $ ruleName , $ replacements ) ; }
Parse a message

@param string $key            The array key
@param string $ruleName       The (translated) name of the rule
@param array  $keyRules       The rule array for one key
@param array  $keyTitles      Custom titles for the keys
@param array  $customMessages Custom messages (if passed)

@return string
Parse a message