Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
EmailAddress.php
Go to the documentation of this file.
1 <?php
9 
10 class EmailAddress extends \Zend_Validate_EmailAddress implements \Magento\Framework\Validator\ValidatorInterface
11 {
24  public function __construct($options = [])
25  {
26  parent::__construct($options);
27 
28  $this->getHostnameValidator()->setValidateTld(false);
29  }
30 
37  public function setValidateTld(bool $shouldValidate)
38  {
39  $this->getHostnameValidator()->setValidateTld($shouldValidate);
40  }
41 }