function hosting_task_TASK_TYPE_form_validate

7.x-3.x hosting_task.api.php hosting_task_TASK_TYPE_form_validate($form, &$form_state)

Validate the form data defined in hosting_task_TASK_TYPE_form().

See also

hosting_task_confirm_form()

Related topics

File

task/hosting_task.api.php, line 92
Hooks provided by the hosting tasks module.

Code

function hosting_task_TASK_TYPE_form_validate($form, &$form_state) {
  // From hosting_task_clone_form_validate()
  $site = $form['parameters']['#node'];

  $url = strtolower(trim($form_state['values']['parameters']['new_uri'])); // domain names are case-insensitive
  if ($url == strtolower(trim($site->title))) {
    form_set_error('new_uri', t("To clone a site you need to specify a new Domain name to clone it to."));
  }
  else {
    hosting_task_migrate_form_validate($form, $form_state);
  }

}