domain_validate

Versions
domain
domain_validate($subdomain)

Validates a domain string.

Parameters

string $subdomain The string to check for domain validity

Return value

array List of error messages or empty array.

Code

./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;
}
?>

Contact

  • agentrickard [at] gmail [dot] com

Donations

My Amazon.com Wish List