function _entityreference_element_validate_filter in Entity reference 8
Same name and namespace in other branches
- 7 entityreference.module \_entityreference_element_validate_filter()
1 string reference to '_entityreference_element_validate_filter'
- SelectionBase::settingsForm in lib/
Drupal/ entityreference/ Plugin/ entityreference/ selection/ SelectionBase.php - Implements EntityReferenceHandler::settingsForm().
File
- ./
entityreference.module, line 287 - Provides a field that can reference other entities.
Code
function _entityreference_element_validate_filter(&$element, &$form_state) {
$element['#value'] = array_filter($element['#value']);
form_set_value($element, $element['#value'], $form_state);
}