You are here

function backup_migrate_source_db::edit_form_validate in Backup and Migrate 6.3

Same name and namespace in other branches
  1. 8.3 includes/sources.db.inc \backup_migrate_source_db::edit_form_validate()
  2. 7.3 includes/sources.db.inc \backup_migrate_source_db::edit_form_validate()

Validate the configuration form. Make sure the db info is valid.

Overrides backup_migrate_item::edit_form_validate

File

includes/sources.db.inc, line 53
Functions to handle the direct to database destination.

Class

backup_migrate_source_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);
}