You are here

function views_handler_filter_term_node_tid::value_validate in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 6.2 modules/taxonomy/views_handler_filter_term_node_tid.inc \views_handler_filter_term_node_tid::value_validate()
  2. 7.3 modules/taxonomy/views_handler_filter_term_node_tid.inc \views_handler_filter_term_node_tid::value_validate()

Validate the options form.

Overrides views_handler_filter::value_validate

File

modules/taxonomy/views_handler_filter_term_node_tid.inc, line 182

Class

views_handler_filter_term_node_tid
Filter by term id.

Code

function value_validate($form, &$form_state) {

  // We only validate if they've chosen the text field style.
  if ($this->options['type'] != 'textfield') {
    return;
  }
  $values = drupal_explode_tags($form_state['values']['options']['value']);
  $tids = $this
    ->validate_term_strings($form['value'], $values);
  if ($tids) {
    $form_state['values']['options']['value'] = $tids;
  }
}