protected function TaxonomyIndexTid::valueValidate

Validate the options form.

Overrides FilterPluginBase::valueValidate

File

drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php, line 214
Definition of views_handler_filter_term_node_tid.

Class

TaxonomyIndexTid
Filter by term id.

Namespace

Drupal\taxonomy\Plugin\views\filter

Code

protected function valueValidate($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;
  }
}