public function isValid($value) { if (!
is_string($value)) { $this->
_error(self::INVALID
);
return false;
} $this->
_setValue($value);
// Check input against IP address schema
if (preg_match('/^[0-9a-f:.]*$/i',
$value) &&
$this->_options
['ip'
]->
setTranslator($this->
getTranslator())->
isValid($value)) { if (!
($this->_options
['allow'
] & self::ALLOW_IP
)) { $this->
_error(self::IP_ADDRESS_NOT_ALLOWED
);
return false;
} else { return true;
} } // RFC3986 3.2.2 states:
//
// The rightmost domain label of a fully qualified domain name