static public function length($value, $length, $message = null, $propertyPath = null, $encoding = 'utf8')
        {
            static::string($value, $message);

            if (mb_strlen($value, $encoding) !== $length) {
                $message = $message ?: sprintf(
                    'Value "%s" has to be %d exactly characters long, but length is %d.',
                    static::stringify($value),
                    $length,
                    mb_strlen($value, $encoding)
                );

                $constraints = array('length' => $length, 'encoding' => $encoding);

                throw static::createException($value, $message, static::INVALID_LENGTH, $propertyPath, $constraints);
            }
        }