|
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
| __construct ($options=array()) | |
| getOptions () | |
| setOptions (array $options=array()) | |
| setMessage ($messageString, $messageKey=null) | |
| getHostnameValidator () | |
| setHostnameValidator (Zend_Validate_Hostname $hostnameValidator=null, $allow=Zend_Validate_Hostname::ALLOW_DNS) | |
| validateMxSupported () | |
| getValidateMx () | |
| setValidateMx ($mx) | |
| getDeepMxCheck () | |
| setDeepMxCheck ($deep) | |
| getDomainCheck () | |
| setDomainCheck ($domain=true) | |
| isValid ($value) | |
Public Member Functions inherited from Zend_Validate_Abstract | |
| getMessages () | |
| getMessageVariables () | |
| getMessageTemplates () | |
| setMessage ($messageString, $messageKey=null) | |
| setMessages (array $messages) | |
| __get ($property) | |
| getErrors () | |
| setObscureValue ($flag) | |
| getObscureValue () | |
| setTranslator ($translator=null) | |
| getTranslator () | |
| hasTranslator () | |
| setDisableTranslator ($flag) | |
| translatorIsDisabled () | |
Data Fields | |
| const | INVALID = 'emailAddressInvalid' |
| const | INVALID_FORMAT = 'emailAddressInvalidFormat' |
| const | INVALID_HOSTNAME = 'emailAddressInvalidHostname' |
| const | INVALID_MX_RECORD = 'emailAddressInvalidMxRecord' |
| const | INVALID_SEGMENT = 'emailAddressInvalidSegment' |
| const | DOT_ATOM = 'emailAddressDotAtom' |
| const | QUOTED_STRING = 'emailAddressQuotedString' |
| const | INVALID_LOCAL_PART = 'emailAddressInvalidLocalPart' |
| const | LENGTH_EXCEEDED = 'emailAddressLengthExceeded' |
Protected Attributes | |
| $_messageTemplates | |
| $_invalidIp | |
| $_messageVariables | |
| $_hostname | |
| $_localPart | |
| $_options | |
Protected Attributes inherited from Zend_Validate_Abstract | |
| $_value | |
| $_messageVariables = array() | |
| $_messageTemplates = array() | |
| $_messages = array() | |
| $_obscureValue = false | |
| $_errors = array() | |
| $_translator | |
| $_translatorDisabled = false | |
Additional Inherited Members | |
Static Public Member Functions inherited from Zend_Validate_Abstract | |
| static | setDefaultTranslator ($translator=null) |
| static | getDefaultTranslator () |
| static | hasDefaultTranslator () |
| static | getMessageLength () |
| static | setMessageLength ($length=-1) |
Protected Member Functions inherited from Zend_Validate_Abstract | |
| _createMessage ($messageKey, $value) | |
| _implodeRecursive (array $pieces) | |
| _error ($messageKey, $value=null) | |
| _setValue ($value) | |
Static Protected Attributes inherited from Zend_Validate_Abstract | |
| static | $_defaultTranslator |
| static | $_messageLength = -1 |
Definition at line 38 of file EmailAddress.php.
| __construct | ( | $options = array() | ) |
Instantiates hostname validator for local use
The following option keys are supported: 'hostname' => 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
| array | string | Zend_Config | $options | OPTIONAL |
Definition at line 137 of file EmailAddress.php.
| getDeepMxCheck | ( | ) |
| getDomainCheck | ( | ) |
| getHostnameValidator | ( | ) |
Returns the set hostname validator
Definition at line 236 of file EmailAddress.php.
| getOptions | ( | ) |
| getValidateMx | ( | ) |
| isValid | ( | $value | ) |
Defined by Zend_Validate_Interface
Returns true if and only if $value is a valid email address according to RFC2822
RFC2822 http://www.columbia.edu/kermit/ascii.html US-ASCII characters string $value boolean
Implements Zend_Validate_Interface.
Definition at line 532 of file EmailAddress.php.
| setDeepMxCheck | ( | $deep | ) |
Set whether we check MX record should be a deep validation
| boolean | $deep | Set deep to true to perform a deep validation process for MX records |
Definition at line 315 of file EmailAddress.php.
| setDomainCheck | ( | $domain = true | ) |
Sets if the domain should also be checked or only the local part of the email address
| boolean | $domain |
Definition at line 338 of file EmailAddress.php.
| setHostnameValidator | ( | Zend_Validate_Hostname | $hostnameValidator = null, |
$allow = Zend_Validate_Hostname::ALLOW_DNS |
|||
| ) |
| Zend_Validate_Hostname | $hostnameValidator | OPTIONAL |
| int | $allow | OPTIONAL |
Definition at line 246 of file EmailAddress.php.
| setMessage | ( | $messageString, | |
$messageKey = null |
|||
| ) |
Sets the validation failure message template for a particular key Adds the ability to set messages to the attached hostname validator
| string | $messageString | |
| string | $messageKey | OPTIONAL |
| Zend_Validate_Exception |
Definition at line 215 of file EmailAddress.php.
| setOptions | ( | array | $options = array() | ) |
Set options for the email validator
| array | $options |
Definition at line 175 of file EmailAddress.php.
| setValidateMx | ( | $mx | ) |
Set whether we check for a valid MX record via DNS
This only applies when DNS hostnames are validated
| boolean | $mx | Set allowed to true to validate for MX records, and false to not validate them |
| Zend_Validate_Exception |
Definition at line 288 of file EmailAddress.php.
| validateMxSupported | ( | ) |
Whether MX checking via getmxrr is supported or not
This currently only works on UNIX systems
Definition at line 264 of file EmailAddress.php.
|
protected |
Definition at line 108 of file EmailAddress.php.
|
protected |
Definition at line 79 of file EmailAddress.php.
|
protected |
Definition at line 113 of file EmailAddress.php.
|
protected |
Definition at line 53 of file EmailAddress.php.
|
protected |
Definition at line 100 of file EmailAddress.php.
|
protected |
Internal options array
Definition at line 118 of file EmailAddress.php.
| const DOT_ATOM = 'emailAddressDotAtom' |
Definition at line 45 of file EmailAddress.php.
| const INVALID = 'emailAddressInvalid' |
Definition at line 40 of file EmailAddress.php.
| const INVALID_FORMAT = 'emailAddressInvalidFormat' |
Definition at line 41 of file EmailAddress.php.
| const INVALID_HOSTNAME = 'emailAddressInvalidHostname' |
Definition at line 42 of file EmailAddress.php.
| const INVALID_LOCAL_PART = 'emailAddressInvalidLocalPart' |
Definition at line 47 of file EmailAddress.php.
| const INVALID_MX_RECORD = 'emailAddressInvalidMxRecord' |
Definition at line 43 of file EmailAddress.php.
| const INVALID_SEGMENT = 'emailAddressInvalidSegment' |
Definition at line 44 of file EmailAddress.php.
| const LENGTH_EXCEEDED = 'emailAddressLengthExceeded' |
Definition at line 48 of file EmailAddress.php.
| const QUOTED_STRING = 'emailAddressQuotedString' |
Definition at line 46 of file EmailAddress.php.