public function Date::validateOptionsForm

Simple validate handler

Overrides FilterPluginBase::validateOptionsForm

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/filter/Date.php, line 48
Definition of Drupal\views\Plugin\views\filter\Date.

Class

Date
Filter to handle dates stored as a timestamp.

Namespace

Drupal\views\Plugin\views\filter

Code

public function validateOptionsForm(&$form, &$form_state) {
  parent::validateOptionsForm($form, $form_state);
  if (!empty($this->options['exposed']) && empty($form_state['values']['options']['expose']['required'])) {

    // Who cares what the value is if it's exposed and non-required.
    return;
  }
  $this
    ->validateValidTime($form['value'], $form_state['values']['options']['operator'], $form_state['values']['options']['value']);
}