src/Validator/AbstractValidator.php
public function getMessage($language = null)
    {
        if (!$this->messages) {
            return null;
        }

        $message = $this->translateMessage(current($this->messages), $language);

        $messageVariables = $this->getMessageVariables();
        foreach ($messageVariables as $name => $value) {
            $message = str_replace('%'.$name.'%', $value, $message);
        }

        return $message;
    }
public function getMessage($language = null)
    {
        if (!$this->messages) {
            return null;
        }

        $message = $this->translateMessage(current($this->messages), $language);

        $messageVariables = $this->getMessageVariables();
        foreach ($messageVariables as $name => $value) {
            $message = str_replace('%'.$name.'%', $value, $message);
        }

        return $message;
    }
{@inheritdoc}