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

Validate using SmartyValidate to check if field is > 0

 
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
csplrj
Smarty Rookie


Joined: 04 Jun 2007
Posts: 28

PostPosted: Thu Jul 19, 2007 4:03 pm    Post subject: Validate using SmartyValidate to check if field is > 0 Reply with quote

I have a propertyType field where the data is numeric and so if the client does not selects any data then I require it to throw error.
When Nothing is selected the properyType is set to 0. So how to validate using SmartyValidate to ensure that propertyType is greater than 0 i.e. something is selected

Thanks in advance

CSJakharia
Back to top
View user's profile Send private message
mohrt
Administrator


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

PostPosted: Thu Jul 19, 2007 6:21 pm    Post subject: Reply with quote

There are validators to test isInt, isEmpty (zero length), isRange, but not a validator to test isZero. You could easily create a custom validator for this test.
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