You are here

function hosting_task_migrate_form_validate in Hosting 5

Same name and namespace in other branches
  1. 6.2 migrate/hosting_migrate.module \hosting_task_migrate_form_validate()
  2. 7.4 migrate/hosting_migrate.module \hosting_task_migrate_form_validate()
  3. 7.3 migrate/hosting_migrate.module \hosting_task_migrate_form_validate()

File

migrate/hosting_migrate.module, line 90

Code

function hosting_task_migrate_form_validate($form_id, $form_values, $form, $site) {
  if (!$form_values['parameters']['target_platform']) {
    form_set_error('parameters][target_platform', t('You need to select a valid platform to migrate your site to.'));
  }
  if ($form_values['parameters']['target_platform'] == $site->platform) {
    form_set_error('parameters][target_platform', t('You may not select your current platform to migrate your site to.'));
  }
}