You are here

function weather_location_settings_form_validate in Weather 7.2

Same name and namespace in other branches
  1. 7.3 weather.forms.inc \weather_location_settings_form_validate()
  2. 7 weather.forms.inc \weather_location_settings_form_validate()

Implements hook_form_validate().

File

./weather.forms.inc, line 671
Provide forms for configuration of weather displays.

Code

function weather_location_settings_form_validate($form, &$form_state) {
  module_load_include('inc', 'weather', 'weather.common');

  // Make sure the GeoID is supported by the module.
  if (weather_get_information_about_geoid($form_state['values']['place']) == FALSE) {
    form_set_error('place', t('The place is not supported by this module.'));
  }
}