You are here

public function geofieldProximityGeocoderWithHTML5::value_validate in IP Geolocation Views & Maps 7

Overrides geofieldProximityBase::value_validate

File

views/proximity_plugins/geofieldProximityGeocoderWithHTML5.inc, line 28
Contains geofieldProximityGeocoderWithHTML5.

Class

geofieldProximityGeocoderWithHTML5
@file Contains geofieldProximityGeocoderWithHTML5.

Code

public function value_validate(&$form, &$form_state, $views_plugin) {
  $values = $form_state['values']['options']['value'];
  if (!is_numeric($values['distance']) || $values['distance'] < 0) {
    form_set_error(NULL, t('Not a valid distance.'));
  }
}