You are here

function backup_migrate_destination_nodesquirrel::before_backup_form_validate in Backup and Migrate 6.3

Same name and namespace in other branches
  1. 8.3 includes/destinations.nodesquirrel.inc \backup_migrate_destination_nodesquirrel::before_backup_form_validate()

Validate the before_backup_form form.

File

includes/destinations.nodesquirrel.inc, line 203
Functions to handle the NodeSquirrel backup destination.

Class

backup_migrate_destination_nodesquirrel
A destination for sending database backups to the NodeSquirel backup service.

Code

function before_backup_form_validate($settings, $form, $form_state) {
  if (isset($form_state['values']['nodesquirrel_secret_key'])) {
    $key = trim($form_state['values']['nodesquirrel_secret_key']);
    if ($error = $this
      ->vaidate_key($key)) {
      form_set_error('secret_key', $error);
    }
  }
}