validator icon indicating copy to clipboard operation
validator copied to clipboard

Add domain rule

Open arogachev opened this issue 2 years ago • 1 comments

arogachev avatar May 13 '23 08:05 arogachev

Need option to support wildcards.

Could be done with filter_var:

if ($allowWildcard) {
    $host = str_replace('*', 'wildcard', $host);
}

if (!filter_var($host, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)) {
  // invalid
}

samdark avatar May 13 '23 08:05 samdark