function og_menu_config_form_validate in Organic Groups Menu (OG Menu) 7.3
Same name and namespace in other branches
- 7.2 og_menu.pages.inc \og_menu_config_form_validate()
Validation for OG Menu config form.
File
- ./
og_menu.admin.inc, line 130
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.'));
}
}