public function AutocompleteWidgetBase::errorElement

Overrides \Drupal\field\Plugin\Type\Widget\WidgetBase::errorElement().

Overrides WidgetBase::errorElement

File

drupal/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/widget/AutocompleteWidgetBase.php, line 92
Contains \Drupal\entity_reference\Plugin\field\widget\AutocompleteWidgetBase.

Class

AutocompleteWidgetBase
Parent plugin for entity reference autocomplete widgets.

Namespace

Drupal\entity_reference\Plugin\field\widget

Code

public function errorElement(array $element, array $error, array $form, array &$form_state) {
  return $element['target_id'];
}