Re: Workaround for file upload with validate quirk
| From: | Justin Patrin | Date: | Tue, 01 Nov 2005 14:54:18 +0000 |
| Subject: | Re: Workaround for file upload with validate quirk | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-21733@lists.php.net to get a copy of this message | ||
On 11/1/05, Dan Rossi <pear@electroteque.org> wrote:
> why to the renderers ? Not the QF rules ?
>
> How bout somethinj like this
>
> $this->form->addRule('thefile','File
> Required','uploadedfile','Please
> reupload your file');
You can't do that; at least not as you've written it. QF isn't
flexible enough to allow this. You *could* add the rule in, say,
onQuickFormEvent, but you'll have to check if the form was submitted
and all.
>
> Sorry but it should have been thought of already dont you think ?
>
> On 01/11/2005, at 8:43 PM, Mark Wiesemann wrote:
>
> > Dan Rossi wrote:
> >
> >> Logically QF should have this hook :P Should i add it as a feature
> >> request ?
> >
> > I'm pretty sure that such an request wouldn't be accepted. You would
> > need to have localized versions of the "reupload message" in QF and it
> > must be added to all QF renderers.
> >
> > If you would do it yourself, you'd just need to add a few lines to your
> > own code.
> >
> > Mark
> >
> > --
> > PEAR General Mailing List (http://pear.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Justin Patrin