public function WidgetBaseInterface::flagErrors

Reports field-level validation errors against actual form elements.

Parameters

Drupal\Core\Entity\EntityInterface $entity: The entity for which the widget is being submitted.

string $langcode: The language associated to $items.

array $items: The field values.

array $form: The form structure where field elements are attached to. This might be a full form structure, or a sub-element of a larger form.

array $form_state: The form state.

1 method overrides WidgetBaseInterface::flagErrors()
WidgetBase::flagErrors in drupal/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBase.php
Implements Drupal\field\Plugin\Type\Widget\WidgetInterface::flagErrors().

File

drupal/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetBaseInterface.php, line 83
Definition of Drupal\field\Plugin\Type\Widget\WidgetBaseInterface.

Class

WidgetBaseInterface
Base interface definition for "Field widget" plugins.

Namespace

Drupal\field\Plugin\Type\Widget

Code

public function flagErrors(EntityInterface $entity, $langcode, array $items, array $form, array &$form_state);