function _entity_reference_element_validate_filter

Form element validation handler; Filters the #value property of an element.

1 string reference to '_entity_reference_element_validate_filter'
SelectionBase::settingsForm in drupal/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/entity_reference/selection/SelectionBase.php
Implements SelectionInterface::settingsForm().

File

drupal/core/modules/entity_reference/entity_reference.module, line 324
Provides a field that can reference other entities.

Code

function _entity_reference_element_validate_filter(&$element, &$form_state) {
  $element['#value'] = array_filter($element['#value']);
  form_set_value($element, $element['#value'], $form_state);
}