added support for new TLDs that are longer than 6 characters like .photography

This commit is contained in:
Dennis Hildenbrand
2014-04-28 19:51:33 +02:00
parent 4dc774c11c
commit 40fd5cd41e

View File

@@ -42,7 +42,7 @@ function validateDomain($domainname)
// a dash (-) in it. As the PHP_VERSION constant
// gives also patch-brandings, e.g. '5.3.2-pl0-gentoo'
// we just always use our regex
$pattern = '/^http:\/\/([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z0-9\-]{2,8}$/i';
$pattern = '/^http:\/\/([a-z0-9]([a-z0-9\-]{0,61}[a-z0-9])?\.)+[a-z0-9\-]{2,63}$/i';
if(preg_match($pattern, $domainname_tmp))
{
return $domainname;