public static function ReferenceWidget::validateReferenceWidget in Select (or other) 8
Same name and namespace in other branches
- 4.x src/Plugin/Field/FieldWidget/ReferenceWidget.php \Drupal\select_or_other\Plugin\Field\FieldWidget\ReferenceWidget::validateReferenceWidget()
Form element validation handler for select_or_other_reference elements.
@codeCoverageIgnore Ignore
File
- src/
Plugin/ Field/ FieldWidget/ ReferenceWidget.php, line 238
Class
- ReferenceWidget
- Plugin implementation of the 'select_or_other_reference' widget.
Namespace
Drupal\select_or_other\Plugin\Field\FieldWidgetCode
public static function validateReferenceWidget(array &$element, FormStateInterface $form_state, array &$complete_form) {
self::prepareElementValuesForValidation($element);
if (!empty($element['#value'])) {
EntityAutocomplete::validateEntityAutocomplete($element, $form_state, $complete_form);
}
}