diff --git a/core/modules/system/system.module b/core/modules/system/system.module index ce1b39b..6d35954 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -2312,6 +2312,11 @@ function system_data_type_info() { 'description' => t('An entity field referencing a language.'), 'class' => '\Drupal\Core\Entity\Field\Type\LanguageItem', 'list class' => '\Drupal\Core\Entity\Field\Type\Field', + 'constraints' => array( + 'ComplexData' => array( + 'value' => array('Length' => array('max' => 12)), + ), + ), ), 'entity_reference_field' => array( 'label' => t('Entity reference field item'), diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php index 2cf25ec..1d2b879 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestStorageController.php @@ -49,9 +49,6 @@ public function baseFieldDefinitions() { 'label' => t('Language code'), 'description' => t('The language code of the test entity.'), 'type' => 'language_field', - 'property_constraints' => array( - 'value' => array('Length' => array('max' => 12)), - ), ); $fields['name'] = array( 'label' => t('Name'),