diff options
author | xue <> | 2006-01-19 02:54:27 +0000 |
---|---|---|
committer | xue <> | 2006-01-19 02:54:27 +0000 |
commit | 5d88ad05e5956071d5904662d133625f157ce230 (patch) | |
tree | 9788f5edddb40024256440208ae2f87eef14269b /framework/Web/UI/WebControls/TEmailAddressValidator.php | |
parent | e4a486b62af0895fd690588129de1190ebf7bd12 (diff) |
Added documentation to validator controls.
Diffstat (limited to 'framework/Web/UI/WebControls/TEmailAddressValidator.php')
-rw-r--r-- | framework/Web/UI/WebControls/TEmailAddressValidator.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/framework/Web/UI/WebControls/TEmailAddressValidator.php b/framework/Web/UI/WebControls/TEmailAddressValidator.php index 48516c44..b6ceff90 100644 --- a/framework/Web/UI/WebControls/TEmailAddressValidator.php +++ b/framework/Web/UI/WebControls/TEmailAddressValidator.php @@ -20,7 +20,7 @@ Prado::using('System.Web.UI.WebControls.TRegularExpressionValidator'); *
* TEmailAddressValidator validates whether the value of an associated
* input component is a valid email address. It will check MX record
- * if checkdnsrr() is implemented.
+ * if checkdnsrr() is available in the installed PHP.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Revision: $ $Date: $
@@ -29,14 +29,24 @@ Prado::using('System.Web.UI.WebControls.TRegularExpressionValidator'); */
class TEmailAddressValidator extends TRegularExpressionValidator
{
+ /**
+ * Regular expression used to validate the email address
+ */
const EMAIL_REGEXP="\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";
+ /**
+ * @return string the regular expression that determines the pattern used to validate a field.
+ */
public function getRegularExpression()
{
$regex=parent::getRegularExpression();
return $regex===''?self::EMAIL_REGEXP:$regex;
}
+ /**
+ * Returns an array of javascript validator options.
+ * @return array javascript validator options.
+ */
public function evaluateIsValid()
{
$valid=parent::evaluateIsValid();
|