Fully Qualified Name: | Laminas\Validator\EmailAddress |
Extends: | AbstractValidator |
Name | Description | Defined By |
---|---|---|
__construct() | Instantiates hostname validator for local use | EmailAddress |
__get() | Magic function returns the value of the requested property, if and only if it is the value or a message variable. | AbstractValidator |
__invoke() | Invoke as command | AbstractValidator |
getAllow() | Returns the allow option of the attached hostname validator | EmailAddress |
getDeepMxCheck() | Returns the set deepMxCheck option | EmailAddress |
getDefaultTranslator() | Get default translation object for all validate objects | AbstractValidator |
getDefaultTranslatorTextDomain() | Get default translation text domain for all validate objects | AbstractValidator |
getDomainCheck() | Returns the set domainCheck option | EmailAddress |
getHostnameValidator() | Returns the set hostname validator | EmailAddress |
getMXRecord() | Returns the found MX Record information after validation including weight for further processing | EmailAddress |
getMessageLength() | Returns the maximum allowed message length | AbstractValidator |
getMessageTemplates() | Returns the message templates from the validator | AbstractValidator |
getMessageVariables() | Returns an array of the names of variables that are used in constructing validation failure messages | AbstractValidator |
getMessages() | Returns array of validation failure messages | AbstractValidator |
getMxCheck() | Returns the set validateMx option | EmailAddress |
getOption() | Returns an option | AbstractValidator |
getOptions() | Returns all available options | AbstractValidator |
getTranslator() | Return translation object | AbstractValidator |
getTranslatorTextDomain() | Return the translation text domain | AbstractValidator |
hasDefaultTranslator() | Is there a default translation object set? | AbstractValidator |
hasTranslator() | Does this validator have its own specific translator? | AbstractValidator |
isMxSupported() | Whether MX checking via getmxrr is supported or not | EmailAddress |
isTranslatorEnabled() | Is translation enabled? | AbstractValidator |
isValid() | Defined by Laminas\Validator\ValidatorInterface | EmailAddress |
isValueObscured() | Retrieve flag indicating whether or not value should be obfuscated in messages | AbstractValidator |
setAllow() | Sets the allow option of the hostname validator to use | EmailAddress |
setDefaultTranslator() | Set default translation object for all validate objects | AbstractValidator |
setDefaultTranslatorTextDomain() | Set default translation text domain for all validate objects | AbstractValidator |
setHostnameValidator() | EmailAddress | |
setMessage() | Sets the validation failure message template for a particular key Adds the ability to set messages to the attached hostname validator | EmailAddress |
setMessageLength() | Sets the maximum allowed message length | AbstractValidator |
setMessages() | Sets validation failure message templates given as an array, where the array keys are the message keys, and the array values are the message template strings. | AbstractValidator |
setOptions() | Sets one or multiple options | AbstractValidator |
setTranslator() | Set translation object | AbstractValidator |
setTranslatorEnabled() | Indicate whether or not translation should be enabled | AbstractValidator |
setTranslatorTextDomain() | Set translation text domain | AbstractValidator |
setValueObscured() | Set flag indicating whether or not value should be obfuscated in messages | AbstractValidator |
useDeepMxCheck() | Use deep validation for MX records | EmailAddress |
useDomainCheck() | Sets if the domain should also be checked or only the local part of the email address | EmailAddress |
useMxCheck() | Set whether we check for a valid MX record via DNS | EmailAddress |
Instantiates hostname validator for local use
The following additional option keys are supported: 'hostnameValidator' => A hostname validator, see Laminas\Validator\Hostname 'allow' => Options for the hostname validator, see Laminas\Validator\Hostname::ALLOW_* 'strict' => Whether to adhere to strictest requirements in the spec 'useMxCheck' => If MX check should be enabled, boolean 'useDeepMxCheck' => If a deep MX check should be done, boolean
Parameter Name | Type | Description |
---|---|---|
$options | array|\Traversable | OPTIONAL |
Returns:
Magic function returns the value of the requested property, if and only if it is the value or a message variable.
Parameter Name | Type | Description |
---|---|---|
$property | string |
Returns: mixed
Invoke as command
Parameter Name | Type | Description |
---|---|---|
$value | mixed |
Returns: bool
Returns the allow option of the attached hostname validator
Returns: int
Returns the set deepMxCheck option
Returns: bool
Get default translation object for all validate objects
Returns: \Translator\TranslatorInterface|null
Get default translation text domain for all validate objects
Returns: string
Returns the set domainCheck option
Returns: bool
Returns the set hostname validator
If was not previously set then lazy load a new one
Returns: \Hostname
Returns the found MX Record information after validation including weight for further processing
Returns: array
Returns the maximum allowed message length
Returns: int
Returns the message templates from the validator
Returns: array
Returns an array of the names of variables that are used in constructing validation failure messages
Returns: array
Returns array of validation failure messages
Returns: array
Returns the set validateMx option
Returns: bool
Returns an option
Parameter Name | Type | Description |
---|---|---|
$option | string | Option |
Returns: mixed Returned option
Returns all available options
Returns: array Array with all available options
Return translation object
Returns: \Translator\TranslatorInterface|null
Return the translation text domain
Returns: string
Is there a default translation object set?
Returns: bool
Does this validator have its own specific translator?
Returns: bool
Whether MX checking via getmxrr is supported or not
Returns: bool
Is translation enabled?
Returns: bool
Defined by Laminas\Validator\ValidatorInterface
Returns true if and only if $value is a valid email address according to RFC2822
Parameter Name | Type | Description |
---|---|---|
$value | string |
Returns: bool
Retrieve flag indicating whether or not value should be obfuscated in messages
Returns: bool
Sets the allow option of the hostname validator to use
Parameter Name | Type | Description |
---|---|---|
$allow | int |
Returns: $this Provides a fluent interface
Set default translation object for all validate objects
Parameter Name | Type | Description |
---|---|---|
$translator | \Translator\TranslatorInterface|null | |
$textDomain | string | (optional) |
Returns: void
Set default translation text domain for all validate objects
Parameter Name | Type | Description |
---|---|---|
$textDomain | string |
Returns: void
Parameter Name | Type | Description |
---|---|---|
$hostnameValidator | \Hostname | OPTIONAL |
Returns: $this Provides a fluent interface
Sets the validation failure message template for a particular key Adds the ability to set messages to the attached hostname validator
Parameter Name | Type | Description |
---|---|---|
$messageString | string | |
$messageKey | string | OPTIONAL |
Returns: \AbstractValidator Provides a fluent interface
Sets the maximum allowed message length
Parameter Name | Type | Description |
---|---|---|
$length | int |
Returns:
Sets validation failure message templates given as an array, where the array keys are the message keys, and the array values are the message template strings.
Parameter Name | Type | Description |
---|---|---|
$messages | array |
Returns: $this
Sets one or multiple options
Parameter Name | Type | Description |
---|---|---|
$options | array|\Traversable | Options |
Returns: $this Provides fluid interface
Set translation object
Parameter Name | Type | Description |
---|---|---|
$translator | \Translator\TranslatorInterface|null | |
$textDomain | string | (optional) |
Returns: $this
Indicate whether or not translation should be enabled
Parameter Name | Type | Description |
---|---|---|
$flag | bool |
Returns: $this
Set translation text domain
Parameter Name | Type | Description |
---|---|---|
$textDomain | string |
Returns: $this
Set flag indicating whether or not value should be obfuscated in messages
Parameter Name | Type | Description |
---|---|---|
$flag | bool |
Returns: $this
Use deep validation for MX records
Parameter Name | Type | Description |
---|---|---|
$deep | bool | Set |
Returns: $this Fluid Interface
Sets if the domain should also be checked or only the local part of the email address
Parameter Name | Type | Description |
---|---|---|
$domain | bool |
Returns: $this Fluid Interface
Set whether we check for a valid MX record via DNS
This only applies when DNS hostnames are validated
Parameter Name | Type | Description |
---|---|---|
$mx | bool | Set |
Returns: $this Fluid Interface