|
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 |
schoenung Smarty Rookie
Joined: 05 Apr 2004 Posts: 28
|
Posted: Fri Jul 23, 2004 5:50 pm Post subject: general question transforms |
|
|
If there are more then one error check on a field does the transform need to be called for each check? For example using
{validate field="number" criteria="isInt" transform="trim" .......}
{validate field="number" criteria="isRange" transform="trim" low="1" .......}
Also in the doc "isLenght"
Code: | isLength
--------
example:
{validate field="username" criteria="isLength" trim="yes" min="3" max="10" message="..."}
"isLength": checks if field is a given length. "min" and "max"
attributes required. |
I believe the trim="yes" should be transform="trim" |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Jul 23, 2004 6:28 pm Post subject: |
|
|
It is not necessary to have the transform="trim" on anything but the first one, but its a negligible overhead to leave them there too. It is convenient to leave them there in case you decide to move validation criteria around or remove them. |
|
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
|