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

Class: HTML_QuickForm_Rule_Email

Source Location: /HTML_QuickForm-3.2.14/QuickForm/Rule/Email.php

Class Overview

HTML_QuickForm_Rule
   |
   --HTML_QuickForm_Rule_Email

Email validation rule


Author(s):

Version:

  • Release: 3.2.14

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 38]
Email validation rule


[ 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 40]


Type:   mixed


[ Top ]



Method Detail

getValidationScript   [line 67]

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 ]

validate   [line 50]

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

Validates an email address
  • 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 Mon, 11 Mar 2019 15:59:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.