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.
array $element: An array containing the form element for the widget, as generated by formElement().
array $error: An associative array with the following key-value pairs, as returned by hook_field_validate():
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: An associative array containing the current state of the form.
array The element on which the error should be flagged.
public function errorElement(array $element, array $error, array $form, array &$form_state);