You are here

function avatar_selection_config_form_validate in Avatar Selection 5.2

Same name and namespace in other branches
  1. 5 avatar_selection.module \avatar_selection_config_form_validate()
  2. 6 avatar_selection.admin.inc \avatar_selection_config_form_validate()
  3. 7 avatar_selection.admin.inc \avatar_selection_config_form_validate()

Validate the submission.

Ensure the number of avatars page setting is numeric.

Parameters

$form_id: The form id.

$form_values: Array containing the form values submitted.

File

./avatar_selection.module, line 905
The Avatar Selection module allows the user to pick an avatar image from a list already loaded by an administrative user, and to the administrator to disable uploading other avatar files by the user.

Code

function avatar_selection_config_form_validate($form_id, $form_values) {
  $error = FALSE;
  if ($form_values['op'] == t('Update')) {
    if (!is_numeric($form_values['avatar_per_page'])) {
      form_set_error('avatar_per_page', t('Must be a number.'));
      $error = TRUE;
    }
  }
}