function install_settings_form_validate
7.x install.core.inc | install_settings_form_validate($form, &$form_state) |
6.x install.php | install_settings_form_validate($form, &$form_state) |
Form validation handler for install_settings_form().
See also
install_settings_form_submit()
File
- drupal-7.x/
includes/ install.core.inc, line 940 - API functions for installing Drupal.
Code
function install_settings_form_validate($form, &$form_state) {
$driver = $form_state['values']['driver'];
$database = $form_state['values'][$driver];
$database['driver'] = $driver;
// TODO: remove when PIFR will be updated to use 'db_prefix' instead of
// 'prefix' in the database settings form.
$database['prefix'] = $database['db_prefix'];
unset($database['db_prefix']);
$form_state['storage']['database'] = $database;
$errors = install_database_errors($database, $form_state['values']['settings_file']);
foreach ($errors as $name => $message) {
form_set_error($name, $message);
}
}