1 installer.manager.inc | installer_manager_update_form_validate($form, &$form_state) |
Form validation handler for installer_manager_update_form().
Ensures that at least one project is selected.
See also
installer_manager_update_form_submit()
Related topics
File
- core/
modules/ installer/ installer.manager.inc, line 312 - Administrative screens and processing functions of the Installer module.
Code
function installer_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.'));
}
}