function 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
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.'));
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.