namespace Drupal\options\Plugin\Field\FieldType;
-use Drupal\Component\Utility\Unicode;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
use Drupal\Core\TypedData\DataDefinition;
* {@inheritdoc}
*/
protected static function validateAllowedValue($option) {
- if (Unicode::strlen($option) > 255) {
+ if (mb_strlen($option) > 255) {
return t('Allowed values list: each key must be a string at most 255 characters long.');
}
}