Loading core/modules/text/config/schema/text.schema.yml +1 −1 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ field.widget.settings.text_textarea: type: integer label: 'Rows' placeholder: type: label type: text label: 'Placeholder' field.widget.settings.text_textarea_with_summary: Loading core/tests/Drupal/KernelTests/Core/Entity/EntityFormDisplayValidationTest.php +41 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,47 @@ protected function setUp(): void { /** * Tests validation of entity form display component's widget settings. */ public function testMultilineTextFieldWidgetPlaceholder(): void { public function testMultilineTextFieldWidgetTextAreaPlaceholder(): void { // First, create a field for which widget settings exist. $text_field_storage_config = FieldStorageConfig::create([ 'type' => 'text_long', 'field_name' => 'novel', 'entity_type' => 'user', ]); $text_field_storage_config->save(); $text_field_config = FieldConfig::create([ 'field_storage' => $text_field_storage_config, 'bundle' => 'user', 'dependencies' => [ 'config' => [ $text_field_storage_config->getConfigDependencyName(), ], ], ]); $text_field_config->save(); // Then, configure a form display widget for this field. assert($this->entity instanceof EntityFormDisplayInterface); $this->entity->setComponent('novel', [ 'type' => 'text_textarea', 'region' => 'content', 'settings' => [ 'rows' => 5, 'placeholder' => "Multi\nLine", ], 'third_party_settings' => [], ]); $this->assertValidationErrors([]); } /** * Tests validation of entity form display component's widget settings. * * @todo move in https://www.drupal.org/project/drupal/issues/3551650. */ public function testMultilineTextFieldWidgetTextAreaSummaryPlaceholder(): void { // First, create a field for which widget settings exist. $text_field_storage_config = FieldStorageConfig::create([ 'type' => 'text_with_summary', Loading Loading
core/modules/text/config/schema/text.schema.yml +1 −1 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ field.widget.settings.text_textarea: type: integer label: 'Rows' placeholder: type: label type: text label: 'Placeholder' field.widget.settings.text_textarea_with_summary: Loading
core/tests/Drupal/KernelTests/Core/Entity/EntityFormDisplayValidationTest.php +41 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,47 @@ protected function setUp(): void { /** * Tests validation of entity form display component's widget settings. */ public function testMultilineTextFieldWidgetPlaceholder(): void { public function testMultilineTextFieldWidgetTextAreaPlaceholder(): void { // First, create a field for which widget settings exist. $text_field_storage_config = FieldStorageConfig::create([ 'type' => 'text_long', 'field_name' => 'novel', 'entity_type' => 'user', ]); $text_field_storage_config->save(); $text_field_config = FieldConfig::create([ 'field_storage' => $text_field_storage_config, 'bundle' => 'user', 'dependencies' => [ 'config' => [ $text_field_storage_config->getConfigDependencyName(), ], ], ]); $text_field_config->save(); // Then, configure a form display widget for this field. assert($this->entity instanceof EntityFormDisplayInterface); $this->entity->setComponent('novel', [ 'type' => 'text_textarea', 'region' => 'content', 'settings' => [ 'rows' => 5, 'placeholder' => "Multi\nLine", ], 'third_party_settings' => [], ]); $this->assertValidationErrors([]); } /** * Tests validation of entity form display component's widget settings. * * @todo move in https://www.drupal.org/project/drupal/issues/3551650. */ public function testMultilineTextFieldWidgetTextAreaSummaryPlaceholder(): void { // First, create a field for which widget settings exist. $text_field_storage_config = FieldStorageConfig::create([ 'type' => 'text_with_summary', Loading