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
Gecontroleerd op virussen door de JOJO Secure Gateway.

Reply via email to