You are here

function domain_overview_form_validate in Domain Access 7.3

Validate handler for the domain overview form.

File

./domain.admin.inc, line 123
Administration functions for the domain module.

Code

function domain_overview_form_validate($form, &$form_state) {
  $values = $form_state['values']['domain'];
  $default = $form_state['values']['default_domain'];
  if (isset($values[$default])) {
    $domain = $values[$default]['values'];
    $error = domain_check_response($domain);
    if ($error) {
      $error = t('%domain may not be set as your primary domain.', array(
        '%domain' => domain_get_path($domain),
      )) . '<br />' . $error;
      form_set_error('default_domain', $error);
    }
  }
}