function backup_migrate_destination_db::edit_form_validate in Backup and Migrate 6.2
Same name and namespace in other branches
- 8.2 includes/destinations.db.inc \backup_migrate_destination_db::edit_form_validate()
- 8.3 includes/destinations.db.inc \backup_migrate_destination_db::edit_form_validate()
- 7.3 includes/destinations.db.inc \backup_migrate_destination_db::edit_form_validate()
- 7.2 includes/destinations.db.inc \backup_migrate_destination_db::edit_form_validate()
Validate the configuration form. Make sure the db info is valid.
Overrides backup_migrate_item::edit_form_validate
File
- includes/
destinations.db.inc, line 57 - Functions to handle the direct to database destination.
Class
- backup_migrate_destination_db
- A destination type for saving to a database server.
Code
function edit_form_validate($form, &$form_state) {
if (!preg_match('/[a-zA-Z0-9_\\$]+/', $form_state['values']['path'])) {
form_set_error('path', t('The database name is not valid.'));
}
parent::edit_form_validate($form, $form_state);
}