From 41fb87f676468fd2e55f1aeecac540221617e6f3 Mon Sep 17 00:00:00 2001 From: KingComp Date: Mon, 27 Feb 2017 19:56:22 +0500 Subject: [PATCH] Update Whois.php Example, "ya.ru". Length "ya" = 2. --- src/Phois/Whois/Whois.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Phois/Whois/Whois.php b/src/Phois/Whois/Whois.php index 739de3c..b02e927 100644 --- a/src/Phois/Whois/Whois.php +++ b/src/Phois/Whois/Whois.php @@ -189,7 +189,7 @@ public function isValid() ) { $tmp_domain = strtolower($this->subDomain); if ( - preg_match("/^[a-z0-9\-]{3,}$/", $tmp_domain) + preg_match("/^[a-z0-9\-]{2,}$/", $tmp_domain) && !preg_match("/^-|-$/", $tmp_domain) //&& !preg_match("/--/", $tmp_domain) ) { return true;