PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
addRule

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTML
View previous topic :: View next topic  
Author Message
elis.moran



Joined: 14 Jul 2006
Posts: 1

PostPosted: Fri Jul 14, 2006 5:18 am    Post subject: addRule Reply with quote

Hi!... i have a problem with some rule validations when i publkish my site in a web hosting:

For example:
this rule works perfect:
$form->addRule('descripcion','La descripción es obligatoria','required');

i can see the javascript generated on the source view !

but this doesnt generate javascript and doesn´t work !!!

$form->setMaxFileSize(102400);
$form->addRule('foto1','La foto 1 supera el tamaño maximo permitido','maxfilesize', $form->getSubmitValue('MAX_FILE_SIZE'));

$form->addRule('foto1', 'La foto 1 debe ser jpeg', 'mimetype', array('image/jpg', 'image/jpeg'));

can any give an idea of what is the problem??!

thanks, elisa
Back to top
View user's profile Send private message MSN Messenger
mark



Joined: 07 Jan 2007
Posts: 1013

PostPosted: Sun Jan 07, 2007 6:32 pm    Post subject: Reply with quote

This question is rather old (and in the wrong category), but for people that might have a similar problem:

Client-side validation is not possible for file elements, neither for something like the filesize nor for the mime type of the file. Such things can (and will) only be checked on the server (by QF).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTML All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software