You are here

function weather_custom_block_form_validate in Weather 6.5

Same name and namespace in other branches
  1. 5.6 weather.module \weather_custom_block_form_validate()
  2. 5 weather.module \weather_custom_block_form_validate()

Check the submission of the custom weather block

File

./weather.module, line 951
Display <acronym title="METeorological Aerodrome Report">METAR</acronym> weather data from anywhere in the world

Code

function weather_custom_block_form_validate($form, &$form_state) {
  if (weather_get_country_from_icao($form_state['values']['icao']) == '') {
    form_set_error('icao', t('The ICAO code is not supported by this module.'));
  }
}