Browse Source

Added validate_host()

pull/671/head
billz 2 years ago
parent
commit
5189853c19
  1. 5
      includes/functions.php

5
includes/functions.php

@ -452,3 +452,8 @@ function getBridgedState()
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…
Cancel
Save