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

Setting up multiple transforms for a validator

 
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 -> General
View previous topic :: View next topic  
Author Message
sguillory6
Smarty Rookie


Joined: 20 Feb 2006
Posts: 17

PostPosted: Mon Feb 20, 2006 7:04 pm    Post subject: Setting up multiple transforms for a validator Reply with quote

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
View user's profile Send private message Send e-mail
mohrt
Administrator


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

PostPosted: Mon Feb 20, 2006 7:14 pm    Post subject: Reply with quote

comma separate them.

SmartyValidate::register_validator('fullname', 'FullName', 'notEmpty', false, false, 'trim,default:DefaultUser');
Back to top
View user's profile Send private message Visit poster's website
sguillory6
Smarty Rookie


Joined: 20 Feb 2006
Posts: 17

PostPosted: Mon Feb 20, 2006 8:32 pm    Post subject: Thanks Reply with quote

mohrt wrote:
comma separate them.

SmartyValidate::register_validator('fullname', 'FullName', 'notEmpty', false, false, 'trim,default:DefaultUser');
Back to top
View user's profile Send private message Send e-mail
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 -> General 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