function install_settings_form_validate
Form validation handler for install_settings_form().
See also
install_settings_form_submit()
File
-
includes/
install.core.inc, line 952
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);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.