28 if (preg_match(
'#^' . $this->ip4 .
'$#s', $aIP)) {
40 $oct =
'(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])';
41 $this->ip4 =
"(?:{$oct}\\.{$oct}\\.{$oct}\\.{$oct})";
Base class for all validating attribute definitions.
_loadRegex()
Lazy load function to prevent regex from being stuffed in cache.
validate($aIP, $config, $context)
$ip4
IPv4 regex, protected so that IPv6 can reuse it.
Validates an IPv4 address.