Development

/branches/1.2/lib/validator/sfValidatorEmail.class.php

You must first sign up to be able to contribute.

root/branches/1.2/lib/validator/sfValidatorEmail.class.php

Revision 8835, 0.7 kB (checked in by nicolas, 7 years ago)

reverted r8833 (refs #2153)

  • Property svn:mime-type set to text/x-php
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
Line 
1 <?php
2
3 /*
4  * This file is part of the symfony package.
5  * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * sfValidatorEmail validates emails.
13  *
14  * @package    symfony
15  * @subpackage validator
16  * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
17  * @version    SVN: $Id$
18  */
19 class sfValidatorEmail extends sfValidatorRegex
20 {
21   /**
22    * @see sfValidatorRegex
23    */
24   protected function configure($options = array(), $messages = array())
25   {
26     parent::configure($options, $messages);
27
28     $this->setOption('pattern', '/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i');
29   }
30 }
31
Note: See TracBrowser for help on using the browser.