You are here

function og_menu_config_form_validate in Organic Groups Menu (OG Menu) 7.2

Same name and namespace in other branches
  1. 7.3 og_menu.admin.inc \og_menu_config_form_validate()

Validation for OG Menu config form.

File

./og_menu.pages.inc, line 265
Contains page callbacks for og_menu

Code

function og_menu_config_form_validate($form, &$form_state) {
  $max_num = $form_state['values']['og_menu_max_menus_per_group'];
  if (!is_numeric($max_num)) {
    form_set_error('og_menu_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('og_menu_max_menus_per_group', t('Maximum number of menus per group must be positive.'));
  }
}