✏️ 编辑:sfValidatorEmail.class.php
路径:
/virtual/bigbrother/sns/lib/symfony/validator/sfValidatorEmail.class.php
大小:805 B · 修改:2010-08-11 06:11:37 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php /* * This file is part of the symfony package. * (c) Fabien Potencier <fabien.potencier@symfony-project.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * sfValidatorEmail validates emails. * * @package symfony * @subpackage validator * @author Fabien Potencier <fabien.potencier@symfony-project.com> * @version SVN: $Id: sfValidatorEmail.class.php 8835 2008-05-07 16:50:28Z nicolas $ */ class sfValidatorEmail extends sfValidatorRegex { /** * @see sfValidatorRegex */ protected function configure($options = array(), $messages = array()) { parent::configure($options, $messages); $this->setOption('pattern', '/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i'); } }
💾 保存
取消
保存为 UTF-8,换行统一为 LF