Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

SmartyValidate empty=true dont work

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  
Author Message
danny36
Smarty Rookie


Joined: 14 Jul 2004
Posts: 27
Location: Italy - Arezzo (Tuscany)

PostPosted: Mon Sep 06, 2004 4:07 pm    Post subject: SmartyValidate empty=true dont work Reply with quote

HI all,

I want to control the file input type with SmartyValidate, I've this code line:
Code:
{validate field="foto" criteria="isFileSize" max="50k" empty=true message="errore" assign="errore_foto_size"}


when I test my script and I don't upload any file, the SmartyValidate ignore the empty attribute, why this?
Back to top
View user's profile Send private message Visit poster's website
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7366
Location: Lincoln Nebraska, USA

PostPosted: Mon Sep 06, 2004 4:21 pm    Post subject: Reply with quote

You have to prepend "file:" to the varname in the validate tag for isFileSize, see the README.
Back to top
View user's profile Send private message Visit poster's website
danny36
Smarty Rookie


Joined: 14 Jul 2004
Posts: 27
Location: Italy - Arezzo (Tuscany)

PostPosted: Mon Sep 06, 2004 8:07 pm    Post subject: Reply with quote

soooooorry I'm a dummy Confused
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
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


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP