function update_manager_update_form_validate
Form validation handler for update_manager_update_form().
Ensures that at least one project is selected.
See also
update_manager_update_form_submit()
Related topics
1 string reference to 'update_manager_update_form_validate'
- update_manager_update_form in modules/
update/ update.manager.inc - Form constructor for the update form of the Update Manager module.
File
-
modules/
update/ update.manager.inc, line 291
Code
function update_manager_update_form_validate($form, &$form_state) {
if (!empty($form_state['values']['projects'])) {
$enabled = array_filter($form_state['values']['projects']);
}
if (!empty($form_state['values']['disabled_projects'])) {
$disabled = array_filter($form_state['values']['disabled_projects']);
}
if (empty($enabled) && empty($disabled)) {
form_set_error('projects', t('You must select at least one project to update.'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.