Maybe i don’t get it.. but alnum should represent the character class 
[A-Za-z0-9]+ and this should match „foobar1“

 

Von: Andries Seutens [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 22. Juni 2007 15:36
An: Darby Felton
Cc: Graham Anderson; [email protected]
Betreff: Re: [fw-general] Zend_Validate_Alnum::isValid evaluating alnum strings 
as false

 

Hi,

Sorry, but nor "foobar1" and "[EMAIL PROTECTED]" would *not* pass this 
validator, as they are *not* "AlNum"...

Your result: "foobar1:false [EMAIL PROTECTED]:false" is pretty ok....

Best,

Andries Seutens

Darby Felton schreef: 

Hi Graham,
 
I just added the potentially offending data to the unit tests for
Zend_Validate_Alnum, but I have been unable to reproduce the problem on
either of the two following platforms:
 
* PHP 5.1.4, WinXP, PCRE 6.6
 
* PHP 5.2.1, Ubuntu, PCRE 6.7
 
Are you on FreeBSD by chance?
 
Anyone else experiencing such a problem?
 
On another note, I would highly recommend upgrading your PHP beyond
5.2.0, which introduced some problems that have since been addressed in
later releases.
 
Best regards,
Darby
 
Graham Anderson wrote:
  

I updated against trunk and now...
 
require_once('Zend/Validate/Alnum.php');
 
$validator = new Zend_Validate_Alnum();
 
$vars = array (  'Alnum' => 'foobar1',
                         'NotAlnum' => '[EMAIL PROTECTED]' );
 
foreach ( $vars as $var ) {
  echo $validator->isValid($var) ? $var .':true ' : $var . ':false ';
}
 
--
result: foobar1:false [EMAIL PROTECTED]:false
--
 
php5 -v
PHP 5.2.0 with Suhosin-Patch 0.9.6.1 (cli) (built: May  8 2007 20:00:45)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
    with Suhosin v0.9.10, (C) Copyright 2006, by Hardened-PHP Project
 
    

 
 
  






-- 
Andries Seutens
http://andries.systray.be

Reply via email to