You are here

function groupmenu_config_form_validate in Group Menu 7

Validation for Group Menu config form.

File

./groupmenu.admin.inc, line 61
Administrative functionality for groupmenu.

Code

function groupmenu_config_form_validate($form, &$form_state) {
  $max_num = $form_state['values']['groupmenu_max_menus_per_group'];
  if (!is_numeric($max_num)) {
    form_set_error('groupmenu_max_menus_per_group', t('You must enter an integer for the maximum number of menus per group.'));
  }
  elseif ($max_num < 0) {
    form_set_error('groupmenu_max_menus_per_group', t('Maximum number of menus per group must be positive.'));
  }
}