Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

SmartyValidate empty=true dont work

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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: 7368
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:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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