|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
csplrj Smarty Rookie
Joined: 04 Jun 2007 Posts: 28
|
Posted: Thu Jul 19, 2007 4:03 pm Post subject: Validate using SmartyValidate to check if field is > 0 |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Jul 19, 2007 6:21 pm Post subject: |
|
|
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 |
|
|
|
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
|