You are here

function _hosting_valid_fqdn in Hosting 5

Same name and namespace in other branches
  1. 6.2 hosting.inc \_hosting_valid_fqdn()
  2. 7.4 hosting.inc \_hosting_valid_fqdn()
  3. 7.3 hosting.inc \_hosting_valid_fqdn()

Check if the FQDN provided is valid.

2 calls to _hosting_valid_fqdn()
hosting_site_validate in site/hosting_site.module
hosting_web_server_validate in web_server/hosting_web_server.module
Implementation of hook_validate().

File

./hosting.module, line 331
Hosting module

Code

function _hosting_valid_fqdn($fqdn) {

  # regex is an implementation of RFC1035
  return preg_match("/^([a-z0-9]([a-z0-9-]*[a-z0-9])?\\.?)+\$/i", $fqdn);
}