![Smarty Forum Index Smarty Forum Index](templates/smarty/images/phpbb2_logo.gif) |
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 |
ripples Smarty n00b
Joined: 29 Jul 2009 Posts: 1
|
Posted: Wed Jul 29, 2009 7:12 pm Post subject: Custom Validator |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu Jul 30, 2009 2:48 am Post subject: |
|
|
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 |
|
|
|
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
|