Zend Framework
1.12
|
Public Member Functions | |
__construct ($options=array()) | |
Instantiates hostname validator for local use. | |
getOptions () | |
Returns all set Options. | |
setOptions (array $options=array()) | |
Set options for the email validator. | |
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. | |
getHostnameValidator () | |
Returns the set hostname validator. | |
setHostnameValidator (Zend_Validate_Hostname $hostnameValidator=null, $allow=Zend_Validate_Hostname::ALLOW_DNS) | |
validateMxSupported () | |
Whether MX checking via getmxrr is supported or not. | |
getValidateMx () | |
Returns the set validateMx option. | |
setValidateMx ($mx) | |
Set whether we check for a valid MX record via DNS. | |
getDeepMxCheck () | |
Returns the set deepMxCheck option. | |
setDeepMxCheck ($deep) | |
Set whether we check MX record should be a deep validation. | |
getDomainCheck () | |
Returns the set domainCheck option. | |
setDomainCheck ($domain=true) | |
Sets if the domain should also be checked or only the local part of the email address. | |
isValid ($value) | |
Defined by Zend_Validate_Interface. | |
![]() | |
getMessages () | |
Returns array of validation failure messages. | |
getMessageVariables () | |
Returns an array of the names of variables that are used in constructing validation failure messages. | |
getMessageTemplates () | |
Returns the message templates from the validator. | |
setMessage ($messageString, $messageKey=null) | |
Sets the validation failure message template for a particular key. | |
setMessages (array $messages) | |
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. | |
__get ($property) | |
Magic function returns the value of the requested property, if and only if it is the value or a message variable. | |
getErrors () | |
Returns array of validation failure message codes. | |
setObscureValue ($flag) | |
Set flag indicating whether or not value should be obfuscated in messages. | |
getObscureValue () | |
Retrieve flag indicating whether or not value should be obfuscated in messages. | |
setTranslator ($translator=null) | |
Set translation object. | |
getTranslator () | |
Return translation object. | |
hasTranslator () | |
Does this validator have its own specific translator? | |
setDisableTranslator ($flag) | |
Indicate whether or not translation should be disabled. | |
translatorIsDisabled () | |
Is translation disabled? | |
Public Attributes | |
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 | |
Internal options array. | |
![]() | |
$_value | |
$_messageVariables = array() | |
$_messageTemplates = array() | |
$_messages = array() | |
$_obscureValue = false | |
$_errors = array() | |
$_translator | |
$_translatorDisabled = false | |
Additional Inherited Members | |
![]() | |
static | setDefaultTranslator ($translator=null) |
Set default translation object for all validate objects. | |
static | getDefaultTranslator () |
Get default translation object for all validate objects. | |
static | hasDefaultTranslator () |
Is there a default translation object set? | |
static | getMessageLength () |
Returns the maximum allowed message length. | |
static | setMessageLength ($length=-1) |
Sets the maximum allowed message length. | |
![]() | |
_createMessage ($messageKey, $value) | |
Constructs and returns a validation failure message with the given message key and value. | |
_error ($messageKey, $value=null) | |
_setValue ($value) | |
Sets the value to be validated and clears the messages and errors arrays. | |
![]() | |
static | $_defaultTranslator |
static | $_messageLength = -1 |
__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 | Zend_Config | $options | OPTIONAL |
getDeepMxCheck | ( | ) |
Returns the set deepMxCheck option.
getDomainCheck | ( | ) |
Returns the set domainCheck option.
getHostnameValidator | ( | ) |
Returns the set hostname validator.
getOptions | ( | ) |
Returns all set Options.
getValidateMx | ( | ) |
Returns the set validateMx option.
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.
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 |
setDomainCheck | ( | $domain = true | ) |
Sets if the domain should also be checked or only the local part of the email address.
boolean | $domain |
setHostnameValidator | ( | Zend_Validate_Hostname | $hostnameValidator = null , |
$allow = Zend_Validate_Hostname::ALLOW_DNS |
|||
) |
Zend_Validate_Hostname | $hostnameValidator | OPTIONAL |
int | $allow | OPTIONAL |
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 |
setOptions | ( | array | $options = array() | ) |
Set options for the email validator.
array | $options |
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 |
validateMxSupported | ( | ) |
Whether MX checking via getmxrr is supported or not.
This currently only works on UNIX systems
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Internal options array.
const DOT_ATOM = 'emailAddressDotAtom' |
const INVALID = 'emailAddressInvalid' |
const INVALID_FORMAT = 'emailAddressInvalidFormat' |
const INVALID_HOSTNAME = 'emailAddressInvalidHostname' |
const INVALID_LOCAL_PART = 'emailAddressInvalidLocalPart' |
const INVALID_MX_RECORD = 'emailAddressInvalidMxRecord' |
const INVALID_SEGMENT = 'emailAddressInvalidSegment' |
const LENGTH_EXCEEDED = 'emailAddressLengthExceeded' |
const QUOTED_STRING = 'emailAddressQuotedString' |