function WidgetBaseInterface::flagErrors
Same name in other branches
- 9 core/lib/Drupal/Core/Field/WidgetBaseInterface.php \Drupal\Core\Field\WidgetBaseInterface::flagErrors()
- 8.9.x core/lib/Drupal/Core/Field/WidgetBaseInterface.php \Drupal\Core\Field\WidgetBaseInterface::flagErrors()
- 11.x core/lib/Drupal/Core/Field/WidgetBaseInterface.php \Drupal\Core\Field\WidgetBaseInterface::flagErrors()
Reports field-level validation errors against actual form elements.
Parameters
\Drupal\Core\Field\FieldItemListInterface $items: The field values.
\Symfony\Component\Validator\ConstraintViolationListInterface $violations: A list of constraint violations to flag.
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.
\Drupal\Core\Form\FormStateInterface $form_state: The form state.
1 method overrides WidgetBaseInterface::flagErrors()
- WidgetBase::flagErrors in core/
lib/ Drupal/ Core/ Field/ WidgetBase.php
File
-
core/
lib/ Drupal/ Core/ Field/ WidgetBaseInterface.php, line 68
Class
- WidgetBaseInterface
- Base interface definition for "Field widget" plugins.
Namespace
Drupal\Core\FieldCode
public function flagErrors(FieldItemListInterface $items, ConstraintViolationListInterface $violations, array $form, FormStateInterface $form_state);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.