emailvalidator.class.php
来自「一个用PHP编写的」· PHP 代码 · 共 39 行
PHP
39 行
<?php lt_include( PLOG_CLASS_PATH."class/data/validator/validator.class.php" ); lt_include( PLOG_CLASS_PATH."class/config/config.class.php" ); lt_include( PLOG_CLASS_PATH."class/data/validator/rules/emailformatrule.class.php" ); lt_include( PLOG_CLASS_PATH."class/data/validator/rules/emaildnsrule.class.php" ); /** * \ingroup Validator * * Implements validation of email addresses. If check_email_address_validity is set to * enabled, it will also check whether the email address is valid in the given email server * by adding an EmailDnsRule to the list of rules to validate. * * @see EmailFormatRule * @see EmailDnsRule */ class EmailValidator extends Validator { /** * The constructor only initializes the validator and depending on the * value of check_email_address_validity, it will also add a EmailDnsRule * rule to check for the validity of the mailbox in the given email server */ function EmailValidator() { $this->Validator(); $this->addRule(new EmailFormatRule()); $config =& Config::getConfig(); if ( $config->getValue( "check_email_address_validity" )) { $this->addRule(new EmailDnsRule()); } } }?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?