Re: RE : [PEAR] [QuickForm] file upload and rules

From: Date: Wed, 20 Nov 2002 10:15:08 +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-2766@lists.php.net to get a copy of this message
<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

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