Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Address.php
Go to the documentation of this file.
1 <?php
11 
13 
18 class Address extends \Magento\Framework\App\Config\Value
19 {
24  public function beforeSave()
25  {
26  $value = $this->getValue();
27  if (!\Zend_Validate::is($value, \Magento\Framework\Validator\EmailAddress::class)) {
28  throw new LocalizedException(
29  __('The "%1" email address is incorrect. Verify the email address and try again.', $value)
30  );
31  }
32  return $this;
33  }
34 }
__()
Definition: __.php:13
$value
Definition: gender.phtml:16
static is($value, $classBaseName, array $args=array(), $namespaces=array())
Definition: Validate.php:195