You are here

function domain_configure_form_validate in Domain Access 7.2

Same name and namespace in other branches
  1. 6.2 domain.admin.inc \domain_configure_form_validate()

Validate the primary domain string.

File

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

Code

function domain_configure_form_validate($form, &$form_state) {
  if (!isset($form_state['values']['domain_root'])) {
    return;
  }
  $subdomain = $form_state['values']['domain_root'];
  $domain_changed = (bool) strcmp($form_state['values']['domain_root'], $form['domain']['domain_root']['#default_value']);
  if ($domain_changed) {
    $error_list = domain_validate($subdomain);
    foreach ($error_list as $error) {
      form_set_error('domain_root', $error);
    }
  }
}