Re: QF .. addRule -> Regex

From: Date: Thu, 18 Dec 2003 08:08:43 +0000
Subject: Re: QF .. addRule -> Regex
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-9641@lists.php.net to get a copy of this message
Hi! Helgi wrote:
$form->addRule('username', 'Fooo', 'regex', '[A-Za-z0-9_-]'); This regex code has always worked for me but now it just wont accept it i do for ex. "abc_-987" or anything like that. I haven't found anything about using regex in addRule. Can anyone explain for me how regex works with addRule ? :)
QuickForm Regex rule uses preg_match(), so you should add delimiters to your regex.

« previous php.pear.general (#9641) next »