Calling all Drupal developers!
Help us get this on the first page of Digg. DIGG NOW!
Help us get this on the first page of Digg. DIGG NOW!
avatar_selection_config_form_validate($form, &$form_state)
contributions/avatar_selection/avatar_selection.module, line 891
Validate the submission.
Ensure the number of avatars page setting is numeric.
$form General variable used in drupal, defining the structure & the fields of a form.
&$form_state General reference, used to control the processing of the form.
<?php
function avatar_selection_config_form_validate($form, &$form_state) {
$error = FALSE;
if ($form_state['values']['op'] == t('Update')) {
if (!is_numeric($form_state['values']['avatar_per_page'])) {
form_set_error('avatar_per_page', t('Must be a number.'));
$error = TRUE;
}
}
}
?>