You are here

function weather_es_form_validate in Weather_es 6.3

Same name and namespace in other branches
  1. 7 weather_es.module \weather_es_form_validate()

@author jmsirvent

1 string reference to 'weather_es_form_validate'
weather_es_edit_form in ./weather_es.module
@author jmsirvent

File

./weather_es.module, line 252

Code

function weather_es_form_validate($form, &$form_state) {

  // If there's AHAH sent thats only the combo
  if (!empty($form_state['ahah_submission'])) {
    return;
  }
  if ($form_state['values']['combo']['ciudad'] == '0' or !in_array($form_state['values']['idioma'], array(
    'es',
    'ca',
    'gl',
    'eu',
    'en',
    'fr',
  ))) {
    form_set_error('ciudad', t('You must select a valid city and language.'));
  }
}