function search_admin_settings_validate in Drupal 7
Same name and namespace in other branches
- 5 modules/search/search.module \search_admin_settings_validate()
- 6 modules/search/search.admin.inc \search_admin_settings_validate()
Form validation handler for search_admin_settings().
1 string reference to 'search_admin_settings_validate'
- search_admin_settings in modules/
search/ search.admin.inc - Menu callback: displays the search module settings page.
File
- modules/
search/ search.admin.inc, line 155 - Admin page callbacks for the search module.
Code
function search_admin_settings_validate($form, &$form_state) {
// Check whether we selected a valid default.
if ($form_state['triggering_element']['#value'] != t('Reset to defaults')) {
$new_modules = array_filter($form_state['values']['search_active_modules']);
$default = $form_state['values']['search_default_module'];
if (!in_array($default, $new_modules, TRUE)) {
form_set_error('search_default_module', t('Your default search module is not selected as an active module.'));
}
}
}