You are here

public function backup_migrate_destination_email::settings_form_validate in Backup and Migrate 7.3

Same name and namespace in other branches
  1. 8.2 includes/destinations.email.inc \backup_migrate_destination_email::settings_form_validate()
  2. 8.3 includes/destinations.email.inc \backup_migrate_destination_email::settings_form_validate()
  3. 6.3 includes/destinations.email.inc \backup_migrate_destination_email::settings_form_validate()
  4. 6.2 includes/destinations.email.inc \backup_migrate_destination_email::settings_form_validate()
  5. 7.2 includes/destinations.email.inc \backup_migrate_destination_email::settings_form_validate()

Validate the configuration form. Make sure the email address is valid.

Overrides backup_migrate_destination::settings_form_validate

File

includes/destinations.email.inc, line 51
Functions to handle the email backup destination.

Class

backup_migrate_destination_email
A destination for emailing database backups.

Code

public function settings_form_validate($values) {
  if (!valid_email_address($values['location'])) {
    form_set_error('[location]', t('The e-mail address %mail is not valid.', array(
      '%mail' => $form_state['values']['location'],
    )));
  }
}