public function Date::validateOptionsForm in Views (for Drupal 7) 8.3
Simple validate handler
Overrides FilterPluginBase::validateOptionsForm
File
- lib/
Drupal/ views/ Plugin/ views/ filter/ Date.php, line 50 - Definition of Drupal\views\Plugin\views\filter\Date.
Class
- Date
- Filter to handle dates stored as a timestamp.
Namespace
Drupal\views\Plugin\views\filterCode
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']);
}