Re: QF: Server side 'required' rule on a file element possible?

From: Date: Wed, 23 Jun 2004 16:15:04 +0000
Subject: Re: QF: Server side 'required' rule on a file element possible?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-13273@lists.php.net to get a copy of this message
Tizzle wrote: >I can set: > >$file =& $uploadForm->addElement('file', 'myUploadedFile', >'Photo:'); >$uploadForm->addRule('myUploadedFile', 'Please upload something', >'required'); > >but it is not enforced (the form is processed even when no file is >selected), an added client JS check works fine but i would like a >server side check as a backup. > >Any ideas..? addRule('uploadedfile', ... instead of 'required'. This is probably mentioned in the manual. Bertrand Mansion Mamasam

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