Class Zend_Validate_EmailAddress

Description

Implements interfaces:

  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Validate/EmailAddress.php (line 42)


	
			
Variable Summary
Method Summary
 void __construct ([integer $allow = Zend_Validate_Hostname::ALLOW_DNS], [ $validateMx = false])
 array getMessages ()
 boolean isValid (string $value)
 void setValidateMx (boolean $allowed)
 boolean validateMxSupported ()
Variables
Zend_Validate_Hostname $hostnameValidator (line 56)

Local object for validating the hostname part of an email address

  • access: public
array $_messages = array() (line 49)

Array of validation failure messages

  • access: protected
boolean $_validateMx = false (line 63)

Whether we check for a valid MX record via DNS

  • access: protected
Methods
Constructor __construct (line 76)

Instantiates hostname validator for local use

You can pass a bitfield to determine what types of hostnames are allowed. These bitfields are defined by the ALLOW_* constants in Zend_Validate_Hostname The default is to allow DNS hostnames only

void __construct ([integer $allow = Zend_Validate_Hostname::ALLOW_DNS], [ $validateMx = false])
  • integer $allow
  • $validateMx
getMessages (line 214)

Defined by Zend_Validate_Interface

Returns array of validation failure messages

  • access: public
array getMessages ()

Implementation of:
Zend_Validate_Interface::getMessages()
Returns an array of messages that explain why a previous isValid() call returned false
isValid (line 120)

Defined by Zend_Validate_Interface

Returns true if and only if $value is a valid email address according to RFC2822

boolean isValid (string $value)
  • string $value

Implementation of:
Zend_Validate_Interface::isValid()
Returns true if and only if $value meets the validation requirements
setValidateMx (line 104)

Set whether we check for a valid MX record via DNS

This only applies when DNS hostnames are validated

  • access: public
void setValidateMx (boolean $allowed)
  • boolean $allowed: Set allowed to true to validate for MX records, and false to not validate them
validateMxSupported (line 92)

Whether MX checking via dns_get_mx is supported or not

This currently only works on UNIX systems

  • access: public
boolean validateMxSupported ()

Documentation generated on Sat, 05 May 2007 11:54:08 -0700 by phpDocumentor 1.3.2