public function TablefieldWidget::errorElement in TableField 8.2
Set error only on the first item in a multi-valued field.
Overrides WidgetBase::errorElement
File
- src/
Plugin/ Field/ FieldWidget/ TablefieldWidget.php, line 214
Class
- TablefieldWidget
- Plugin implementation of the 'tablefield' widget.
Namespace
Drupal\tablefield\Plugin\Field\FieldWidgetCode
public function errorElement(array $element, ConstraintViolationInterface $violation, array $form, FormStateInterface $form_state) {
return $element[0];
}