1 views_handler_filter_date.inc views_handler_filter_date::exposed_validate(&$form, &$form_state)

Validate the exposed handler form

Overrides views_handler::exposed_validate

File

core/modules/views/handlers/views_handler_filter_date.inc, line 52
Definition of views_handler_filter_date.

Class

views_handler_filter_date
Filter to handle dates stored as a timestamp.

Code

function exposed_validate(&$form, &$form_state) {
  if (empty($this->options['exposed'])) {
    return;
  }

  if (empty($this->options['expose']['required'])) {
    // Who cares what the value is if it's exposed and non-required.
    return;
  }

  $value = &$form_state['values'][$this->options['expose']['identifier']];
  if (!empty($this->options['expose']['use_operator']) && !empty($this->options['expose']['operator_id'])) {
    $operator = $form_state['values'][$this->options['expose']['operator_id']];
  }
  else {
    $operator = $this->operator;
  }

  $this->validate_valid_time($this->options['expose']['identifier'], $operator, $value);

}