function weather_es_configuration_validate in Weather_es 6
Same name and namespace in other branches
- 5 weather_es.module \weather_es_configuration_validate()
Validate the form.
File
- ./
weather_es.module, line 271 - Non-displayable characters.
Code
function weather_es_configuration_validate($form_id, $form_values) {
if ($form_values['step'] == 1 and $form_values['provincia']['seleccionada'] == 0) {
form_set_error('seleccionada', t('You must select a valid province.'));
}
if ($form_values['step'] == 2 and (strlen($form_values['poblacion']['seleccionada']) != 5 or !in_array($form_values['idioma'], array(
'es',
'ca',
'gl',
'eu',
'en',
'fr',
)))) {
form_set_error('seleccionada', t('You must select a valid city and a valid language.'));
}
}