Bug #4538 [NEW]: addGroupRule() doesn´t care about client-side validation
| From: | sebastian dot goebel at web dot de | Date: | Mon, 06 Jun 2005 15:33:34 +0000 |
| Subject: | Bug #4538 [NEW]: addGroupRule() doesn´t care about client-side validation | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-6242@lists.php.net to get a copy of this message | ||
From: sebastian dot goebel at web dot de
Operating system: Linux
PHP version: 4.3.1
Package: Documentation
Bug Type: Bug
Bug description: addGroupRule() doesn´t care about client-side validation
Description:
------------
It seems there is a bug in adding client-side validation for group rules.
I used above code to set element 'url' in group 'grp' as required, but a
dump of the form object says that this rule is server-side, JS will not
addet.
If I manipulate the form-object using the second instruction than it
workes fine.
Reproduce code:
---------------
$form->addGroupRule('grp',
array(
'url' => array(
array('Missing URL', 'required')
)
),
NULL,
NULL,
NULL,
'client'
);
$form->_rules['grp[url]'][0][validation] = 'client';
Expected result:
----------------
[_rules] => Array
(
[grp[url]] => Array
(
[0] => Array
(
[type] => required
[format] =>
[message] => Missing URL
[validation] => client
[reset] =>
[group] => grp
)
)
)
Actual result:
--------------
[_rules] => Array
(
[grp[url]] => Array
(
[0] => Array
(
[type] => required
[format] =>
[message] => Missing URL
[validation] => server
[reset] =>
[group] => grp
)
)
)
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=4538&edit=1
--