domain_validate($subdomain)Validates a domain string.
string $subdomain The string to check for domain validity
array List of error messages or empty array.
./domain.module, line 803
<?php
function domain_validate($subdomain) {
$error_list = array();
// Validate the domains format generically for now.
$error = domain_valid_domain($subdomain);
if (!empty($error)) {
$error_list[] = $error;
}
// Make sure domain is unique
if (!domain_unique_domain($subdomain)) {
$error_list[] = t('The domain value must be unique.');
}
return $error_list;
}
?>