default
[ class tree: default ] [ index: default ] [ all elements ]

Class: HTML_QuickForm_Rule_Email

Source Location: /pear/HTML/QuickForm/Rule/Email.php

Class Overview

HTML_QuickForm_Rule
   |
   --HTML_QuickForm_Rule_Email

Email validation rule


Author(s):

Version:

  • 1.0

Variables

Methods


Inherited Variables

Inherited Methods

Class: HTML_QuickForm_Rule

HTML_QuickForm_Rule::getValidationScript()
Returns the javascript test (the test should return true if the value is INVALID)
HTML_QuickForm_Rule::setName()
Sets the rule name
HTML_QuickForm_Rule::validate()
Validates a value

Class Details

[line 27]
Email validation rule



Tags:

version:  1.0


[ Top ]


Class Variables

$regex =  '/^((\"[^\"\f\n\r\t\v\b]+\")|([\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+(\.[\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]+))$/'

[line 29]


Type:   mixed


[ Top ]



Class Methods


method getValidationScript [line 55]

void getValidationScript( [ $options = null])



Overrides HTML_QuickForm_Rule::getValidationScript() (Returns the javascript test (the test should return true if the value is INVALID))

Parameters:

   $options  

[ Top ]

method validate [line 39]

boolean validate( string $email, [boolean $checkDomain = false])

Validates an email address



Tags:

return:  true if email is valid
access:  public


Overrides HTML_QuickForm_Rule::validate() (Validates a value)

Parameters:

string   $email   Email address
boolean   $checkDomain   True if dns check should be performed

[ Top ]


Documentation generated on Sun, 08 Jan 2012 17:51:46 +0100 by phpDocumentor 1.4.3