function _support_validate_domains in Support Ticketing System 6
Same name and namespace in other branches
- 7 support.admin.inc \_support_validate_domains()
Validate domains by doing a dns lookup on each.
2 calls to _support_validate_domains()
- support_admin_client_validate in ./
support.admin.inc - support_admin_settings_validate in ./
support.admin.inc - Be sure valid domains are entered.
File
- ./
support.admin.inc, line 602 - support.admin.inc
Code
function _support_validate_domains($field, $domains = array()) {
foreach ($domains as $domain) {
$domain = trim($domain);
if ($domain && ($domain != '*' && function_exists('checkdnsrr') && !checkdnsrr($domain))) {
form_set_error($field, t('Invalid domain: %domain', array(
'%domain' => $domain,
)));
}
}
}