Example #1
0
 public function validateOptionsForm(&$form, FormStateInterface $form_state)
 {
     parent::validateOptionsForm($form, $form_state);
     if (!empty($this->options['exposed']) && $form_state->isValueEmpty(array('options', 'expose', 'required'))) {
         // Who cares what the value is if it's exposed and non-required.
         return;
     }
     $this->validateValidTime($form['value'], $form_state, $form_state->getValue(array('options', 'operator')), $form_state->getValue(array('options', 'value')));
 }