function hosting_alias_site_form_validate in Hosting 7.3
Same name and namespace in other branches
- 6.2 alias/hosting_alias.module \hosting_alias_site_form_validate()
- 7.4 alias/hosting_alias.module \hosting_alias_site_form_validate()
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_alter_alias_validation in subdirs/
hosting_subdirs.module - Replace the normal alias validation with one that will accept subdirs.
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);
}
}