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

Custom 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 -> Add-ons
View previous topic :: View next topic  
Author Message
ripples
Smarty n00b


Joined: 29 Jul 2009
Posts: 1

PostPosted: Wed Jul 29, 2009 7:12 pm    Post subject: Custom Validator Reply with quote

Hi,

I wanted to know how to check if one field is marked "Yes" then is another field empty or not (and an error is issued if it is empty), and I am having a hard time understanding how to do this with the documentation.

Can anyone give me some examples?

Thanks!
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 30, 2009 2:48 am    Post subject: Reply with quote

You would need to create a custom validator, as your subject suggests. Your validator has all of the form values available, so it should be pretty straight forward. There are examples of custom validators in the docs. You can put some specific problems here if you run into them.
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