RE : RE : [PEAR] [QuickForm] file upload and rules
| From: | Yann \(zebulon-fr\) | Date: | Wed, 20 Nov 2002 16:21:52 +0000 |
| Subject: | RE : RE : [PEAR] [QuickForm] file upload and rules | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-2775@lists.php.net to get a copy of this message | ||
Thanks !
I get the CVS now.
Yann
-----Message d'origine-----
De : Bertrand Mansion [mailto:bmansion@mamasam.com]
Envoyé : mercredi 20 novembre 2002 11:15
À : Yann (zebulon-fr); pear-general@lists.php.net
Objet : Re: RE : [PEAR] [QuickForm] file upload and rules
<yann@zebulon-fr.com> wrote :
> My code :
>
> ----------
> ...
> $form->addElement('text', 'username', 'Votre Pseudo');
> $form = new HTML_QuickForm('inscription', 'POST',
> $_SERVER['PHP_SELF']); $form->addElement('file', 'photo',
> 'Votre
> photo');
>
> $form->addRule('photo', 'La taille de votre photo ne doit pas excéder
> 30 ko', 'maxfilesize', 30720); ...
> ----------
>
> It's work if I upload a file but if I don't upload a file, the rule
> work and the form is not submit. I want apply the rule only if the
> user want upload a file.
Hi Yann,
Thanks to Emiliano Saurin, this is now fixed in CVS.
I will make a new release later today.
Bertrand Mansion
Mamasam