protected function getValueLength()
    {
        if ($this->maxlength_ignored_characters != '') {
            $chars = preg_quote($this->maxlength_ignored_characters, '/');
            $pattern = sprintf('/[%s]/u', $chars);
            $value = preg_replace($pattern, '', $this->value);
            $length = mb_strlen($value);
        } else {
            $length = mb_strlen($this->value);
        }
        return $length;
    }