public function SearchApiViewsHandlerFilterTaxonomyTerm::exposed_validate in Search API 7
Validate the exposed handler form.
Overrides SearchApiViewsHandlerFilterEntity::exposed_validate
File
- contrib/
search_api_views/ includes/ handler_filter_taxonomy_term.inc, line 219 - Contains SearchApiViewsHandlerFilterTaxonomyTerm.
Class
- SearchApiViewsHandlerFilterTaxonomyTerm
- Views filter handler class for taxonomy term entities.
Code
public function exposed_validate(&$form, &$form_state) {
if (empty($this->options['exposed']) || empty($this->options['expose']['identifier'])) {
return;
}
// We only validate if they've chosen the text field style.
if ($this->options['type'] != 'textfield') {
$input = $form_state['values'][$this->options['expose']['identifier']];
if ($this->options['is_grouped'] && isset($this->options['group_info']['group_items'][$input])) {
$input = $this->options['group_info']['group_items'][$input]['value'];
}
if ($input != 'All') {
$this->validated_exposed_input = (array) $input;
}
return;
}
parent::exposed_validate($form, $form_state);
}