mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 09:00:25 +00:00
Added validate_host()
This commit is contained in:
parent
199f83777b
commit
5189853c19
1 changed files with 5 additions and 0 deletions
|
@ -452,3 +452,8 @@ function getBridgedState()
|
||||||
return $arrHostapdConf['BridgedEnable'];
|
return $arrHostapdConf['BridgedEnable'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Validates a host or FQDN
|
||||||
|
function validate_host($host) {
|
||||||
|
return preg_match('/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$/i', $host);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue