namespace Drupal\user\Plugin\Validation\Constraint;
-use Drupal\Component\Utility\Unicode;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
) {
$this->context->addViolation($constraint->illegalMessage);
}
- if (Unicode::strlen($name) > USERNAME_MAX_LENGTH) {
+ if (mb_strlen($name) > USERNAME_MAX_LENGTH) {
$this->context->addViolation($constraint->tooLongMessage, ['%name' => $name, '%max' => USERNAME_MAX_LENGTH]);
}
}