mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 19:20:12 +01:00
Fixed validdomain()
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
97f63a11a6
commit
2f1c52583a
@ -168,11 +168,7 @@ function checkdomain($domain, $domains) {
|
|||||||
|
|
||||||
|
|
||||||
function validdomain($domain = '') {
|
function validdomain($domain = '') {
|
||||||
if($domain == '') { return 0; }
|
if(preg_match("/@?local$/", $domain) || preg_match('/^[a-zA-Z0-9]+[a-zA-Z0-9-_\.]{0,}\.[a-zA-Z0-9]{2,10}$/', $domain)) {
|
||||||
|
|
||||||
if(preg_match("/@local$/", $domain)) { return 1; }
|
|
||||||
|
|
||||||
if(preg_match('/@?[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,10})$/', $domain)) {
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user