function hosting_alias_site_form_validate

7.x-3.x hosting_alias.module hosting_alias_site_form_validate($form, &$form_state)

Validation handler for site form.

Makes sure aliases are not more than HOSTING_MAX_ALIAS_LENGTH characters.

2 string references to 'hosting_alias_site_form_validate'
hosting_alias_form_site_node_form_alter in alias/hosting_alias.module
Implements hook_form_alter().
hosting_subdirs_form_alter in subdirs/hosting_subdirs.module
Implements hook_form_alter().

File

alias/hosting_alias.module, line 72
Allow sites to have domain aliases that they can be accessed with.

Code

function hosting_alias_site_form_validate($form, &$form_state) {
  $aliases = $form_state['values']['aliases'] = array_filter($form_state['values']['aliases']);
  foreach ($aliases as $key => $alias) {
    hosting_alias_validate_alias($form_state['node'], $alias, $key);
  }
}