Re: Re: QuickForm (QF): trouble with a group of 'file' elements and group rules

From: Date: Wed, 06 Dec 2006 20:35:50 +0000
Subject: Re: Re: QuickForm (QF): trouble with a group of 'file' elements and group rules
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25991@lists.php.net to get a copy of this message
greetings, thank you for the suggestions so far, Mark. On Wed, Dec 06, 2006 at 07:06:25PM +0100, Mark Wiesemann wrote: > jam@zoidtechnologies.com wrote: > >$form->addGroup($images, "images[]", "Images", "<br > >/>"); > > Just "images" is right here, without the brackets. > ok. tried that, no change. gif images sail right through the rules. > >$form->addGroupRule("images[]", "File name must be *.jpg or > >*.jpeg","filename", "/\.[jpg|jpeg]$/", 10); > removed the brackets from the group name, no change. the group rules are not enforced. > Please try the following for this and the following lines: > $res = $form->addGroupRule(...); > if (PEAR::isError($res)) { > echo $res->getMessage() . '<br />' . $res->getUserInfo(); > } > did this for all the addGroupRule() calls, and went so far as to make the script terminate if it gets *any* errors (after printing the result of toString()). I reran the script, and no errors are reported. > Apart from these two things, I have no ideas (and also no experience > with grouped file elements). > hmm.. well, I guess I can try to use http_upload instead of the rules and such in QF, but only if I can feed QF a list of errors so everything on the site is consistent. > Regards, > Mark > thanks again mark. I appreciate your help. regards, J

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