Re: RE: [PEAR-DEV] projecthoneypot
| From: | Helgi Þormar Þorbjörnsson | Date: | Fri, 13 Mar 2009 09:19:04 +0000 |
| Subject: | Re: RE: [PEAR-DEV] projecthoneypot | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-51619@lists.php.net to get a copy of this message | ||
Hi Boris,
I will remove the suspicous bit from the code when I get to work ... if you
could possible swing by on #pear on efnet in an hour or two to test things,
that help
- Helgi
On Mar 13, 2009 7:32 AM, "boris" <office@povolnam.ru> wrote:
>> Tho I must say - the honeypot project isn't all that bad + we are >> only
stopping off people th...
My IP wasn't listed as spam source - suspicious it was, because it's real IP
I guess. I paid my ISP for real IP 3 months ago, and can't say what previous
owner used it for, but 3 months is more than 30 days, right?
>Most of the time they came from people who wanted to submit bug reports >--
loosing bug reports b...
Could someone else post the report?
For HTML_quickForm v3.2.10.
OS: irrelevant
PHP Version: 5.2.6
Description:
------------
The docs says:
"To validate a group as a whole, just use HTML_QuickForm::addRule(). The
group elements' values will be passed to the validation function as an
array."
But the rule added for a group via addRule() always fails validation both
server and client side.
Test script:
---------------
<?php
require_once("HTML/QuickForm.php");
$form = new HTML_QuickForm('test');
$group[] = $form->createElement('text', 'txt1');
$group[] = $form->createElement('text', 'txt2');
$form->addGroup($group, 'group');
$form->addElement('submit', 'btnSubmit', 'submit');
// for whole group always fails
$form->addRule('group', 'numbers only', 'numeric', null,
'client');
// for each separately works fine
// $rules['txt1'][] = array('numbers only', 'numeric', null,
'client');
// $rules['txt2'][] = array('numbers only', 'numeric', null,
'client');
// $form->addGroupRule('group', $rules);
$form->validate();
echo $form->toHtml();
?>
Expected result:
----------------
Expecting all values of group elements to be passed to validation one by
one.
Actual result:
--------------
All values of group elements passed to validation function as an array on
RuleRegistry.php:158. I guess it was planned that array will be cycled in
foreach on RuleRegistry.php:151, but execution never goes there. And finally
validation for example above fails on Regex.php:69, cause preg_match gets
array instead of single string and throws an error. That's server side,
client side js fails too.
- Boris
-- PEAR Development Mailing List (http://pear.php.net/) To unsubscribe,
visit: http://www.php.net...