Re: [QF] Email & Compare
| From: | Alexey Borzov | Date: | Wed, 24 Dec 2003 15:32:01 +0000 |
| Subject: | Re: [QF] Email & Compare | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9818@lists.php.net to get a copy of this message | ||
Hi!
Helgi wrote:
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(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
'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