1 views_handler_filter_term_node_tid.inc | views_handler_filter_term_node_tid::exposed_validate(&$form, &$form_state) |
Validate the exposed handler form
Overrides views_handler::exposed_validate
File
- core/
modules/ taxonomy/ views/ views_handler_filter_term_node_tid.inc, line 266 - Definition of views_handler_filter_term_node_tid.
Class
- views_handler_filter_term_node_tid
- Filter by term id.
Code
function exposed_validate(&$form, &$form_state) {
if (empty($this->options['exposed'])) {
return;
}
$identifier = $this->options['expose']['identifier'];
// We only validate if they've chosen the text field style.
if ($this->options['type'] != 'textfield') {
if ($form_state['values'][$identifier] != 'All') {
$this->validated_exposed_input = (array) $form_state['values'][$identifier];
}
return;
}
if (empty($this->options['expose']['identifier'])) {
return;
}
$values = backdrop_explode_tags($form_state['values'][$identifier]);
$tids = $this->validate_term_strings($form[$identifier], $values);
if ($tids) {
$this->validated_exposed_input = $tids;
}
}