function TextareaWithSummaryWidget::errorElement
Overrides TextareaWidget::errorElement
File
- 
              core/
modules/ text/ src/ Plugin/ Field/ FieldWidget/ TextareaWithSummaryWidget.php, line 101  
Class
- TextareaWithSummaryWidget
 - Plugin implementation of the 'text_textarea_with_summary' widget.
 
Namespace
Drupal\text\Plugin\Field\FieldWidgetCode
public function errorElement(array $element, ConstraintViolationInterface $violation, array $form, FormStateInterface $form_state) {
  $element = parent::errorElement($element, $violation, $form, $form_state);
  $property_path_array = explode('.', $violation->getPropertyPath());
  return $element === FALSE ? FALSE : $element[$property_path_array[1]];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.