|
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 |
sguillory6 Smarty Rookie
Joined: 20 Feb 2006 Posts: 17
|
Posted: Mon Feb 20, 2006 7:04 pm Post subject: Setting up multiple transforms for a validator |
|
|
I am a little confused as to how I might set up multiple transforms for a validator, say a trim and a default transform. I am guessing something like:
SmartyValidate::register_validator('fullname', 'FullName', 'notEmpty',
false, false, 'trim');
SmartyValidate::register_validator('fullname', 'FullName', 'notEmpty',
false, false, 'default:DefaultUser');
Of course this is not that great an example, since the second transform (the default) hides any possible errors from the first. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Feb 20, 2006 7:14 pm Post subject: |
|
|
comma separate them.
SmartyValidate::register_validator('fullname', 'FullName', 'notEmpty', false, false, 'trim,default:DefaultUser'); |
|
Back to top |
|
sguillory6 Smarty Rookie
Joined: 20 Feb 2006 Posts: 17
|
Posted: Mon Feb 20, 2006 8:32 pm Post subject: Thanks |
|
|
mohrt wrote: | comma separate them.
SmartyValidate::register_validator('fullname', 'FullName', 'notEmpty', false, false, 'trim,default:DefaultUser'); |
|
|
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
|