You are here

function purl_validate_fqdn in Persistent URL 6

Same name and namespace in other branches
  1. 7 purl.admin.inc \purl_validate_fqdn()

Validate that an element has been set with a fully qualified domain name.

2 string references to 'purl_validate_fqdn'
purl_domain::admin_form in includes/purl_domain.inc
Allow extension of the admin setup form.
purl_subdomain::admin_form in includes/purl_subdomain.inc
Allow extension of the admin setup form.

File

./purl.admin.inc, line 118
Admin pages for the purl module.

Code

function purl_validate_fqdn(&$element, &$form_state) {
  if (!empty($element['#value']) && !valid_url($element['#value'], TRUE)) {
    form_set_error($element['#name'], t('The domain must be a fully qualified domain name of the form `http://www.example.com`.'));
  }
}