You are here

protected function TermReference::valueValidate in EntityFieldQuery Views Backend 8

Validate the options form.

Overrides FilterPluginBase::valueValidate

File

src/Plugin/views/filter/TermReference.php, line 198
Contains \Drupal\efq_views\Plugin\views\filter\FieldInOperator.

Class

TermReference
Filter by term id.

Namespace

Drupal\efq_views\Plugin\views\filter

Code

protected function valueValidate($form, FormStateInterface $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
    ->validateTermStrings($form['value'], $values);
  if ($tids) {
    $form_state['values']['options']['value'] = $tids;
  }
}