Development

Changeset 1425

You must first sign up to be able to contribute.

Changeset 1425

Show
Ignore:
Timestamp:
06/13/06 08:20:50 (2 years ago)
Author:
slickrick
Message:

* Added 'strict' option, with a more rigid regex. (Fixes ticket #462)
* Note: 'strict' option is marked true by default (backward compatibility issue)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/slickrick/lib/validator/sfEmailValidator.class.php

    r1140 r1425  
    6161         .'\\x5d))*$/' 
    6262    ; 
     63     
     64    $re = '/^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i'; 
    6365 
    6466    if (!preg_match($re, $value)) 
     
    7779 
    7880    // set defaults 
     81    $this->getParameterHolder()->set('strict',        true); 
    7982    $this->getParameterHolder()->set('email_error', 'Invalid input'); 
    8083