function domain_edit_form_validate in Domain Access 5
FormsAPI for domain_edit_form()
File
- ./
domain_admin.inc, line 584 - Administration functions for the domain module.
Code
function domain_edit_form_validate($form_id, $form_values, $form) {
// TODO: Make this a proper regex
$subdomain = strtolower($form_values['subdomain']);
$domain_changed = (bool) strcmp($form_values['subdomain'], $form['domain']['subdomain']['#default_value']);
if ($domain_changed) {
$error_list = domain_validate($subdomain);
foreach ($error_list as $error) {
form_set_error('subdomain', $error);
}
}
}