A hostname validator, see Zend_Validate_Hostname * 'allow' => Options for the hostname validator, see Zend_Validate_Hostname::ALLOW_* * 'mx' => If MX check should be enabled, boolean * 'deep' => If a deep MX check should be done, boolean * * @inheritdoc */ public function __construct($options = []) { parent::__construct($options); $this->getHostnameValidator()->setValidateTld(false); } /** * Sets whether or not top-level domains should be validated * * @param bool $shouldValidate * @return void */ public function setValidateTld(bool $shouldValidate) { $this->getHostnameValidator()->setValidateTld($shouldValidate); } }