Re: [QF] Email & Compare

From: Date: Wed, 24 Dec 2003 20:25:27 +0000
Subject: Re: [QF] Email & Compare
References: 1 2 3 4  Groups: php.pear.general php.pear.general 
Request: Send a blank email to pear-general+get-9821@lists.php.net to get a copy of this message
Alexey Borzov wrote:
Hi! Helgi wrote:
Compare rule only compares two fields, it doesn't give a f*ck about what is in the fields. It does its comparison in a case-sensitive way, if you want case-insensitive comparison, write your own rule.
Hmm you mean ... if it does case-sensitive then why isn't FOO@example.org and FOO@example.org a match ? :) same with Foo@example.org and Foo@example.org. I'm sorry if you misunderstud me and thought i was trying to match FOO@example.org and foo@example.org. Thanks in advance
The following script gives no errors for me with either client-side or server-side validation: <?php require_once 'HTML/QuickForm.php'; $form =& new HTML_QuickForm('cmpEmail'); $form->setDefaults(array(
    'email'  => 'FOO@example.org',
    'email1' => 'FOO@example.org'
)); $form->addElement('text', 'email', 'Email one:'); $form->addElement('text', 'email1', 'Email two:'); $form->addRule(array('email', 'email1'), 'Dont Match', 'compare'/*, null, 'client'*/); $form->addElement('submit', null, 'Send'); $form->validate(); $form->display(); ?> Do you want me to waste more time chasing non-existant bugs, or will you please finally tell *what* you are *really* trying to do, and where is your error? Here is a wonderful article for you: http://catb.org/~esr/faqs/smart-questions.html
Hmm no just ignore this ... I've been reading the article and now i see what you mean :) *troll*

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