protected function valueValidate($form, &$form_state) { parent::valueValidate($form, $form_state); $proximityPlugin = geofield_proximity_load_plugin($form_state['values']['options']['source']); $proximityPlugin->value_validate($form, $form_state, $this); }
public function acceptExposedInput($input) { if (empty($this->options['exposed'])) { return TRUE; } // Store this because it will get overwritten. $type = $this->value['type']; $rc = parent::acceptExposedInput($input); // Don't filter if value(s) are empty. $operators = $this->operators(); if (!empty($this->options['expose']['use_operator']) && !empty($this->options['expose']['operator_id'])) { $operator = $input[$this->options['expose']['operator_id']]; } else { $operator = $this->operator; } if ($operators[$operator]['values'] == 1) { if ($this->value['value'] == '') { return FALSE; } } else { if ($this->value['min'] == '' || $this->value['max'] == '') { return FALSE; } } // restore what got overwritten by the parent. $this->value['type'] = $type; return $rc; }