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

Simple validate handler

Overrides views_handler_filter::options_validate

File

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

Class

views_handler_filter_date
Filter to handle dates stored as a timestamp.

Code

function options_validate(&$form, &$form_state) {
  parent::options_validate($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->validate_valid_time($form['value'], $form_state['values']['options']['operator'], $form_state['values']['options']['value']);
}