public WidgetBase::errorElement(array $element, ConstraintViolationInterface $error, array $form, FormStateInterface $form_state)
Assigns a field-level validation error to the right widget sub-element.
Depending on the widget's internal structure, a field-level validation error needs to be flagged on the right sub-element.
Parameters
array $element: An array containing the form element for the widget, as generated by formElement().
\Symfony\Component\Validator\ConstraintViolationInterface $vio