[SMARTY] SmartyValidate: conditional validation?

Josh Santangelo <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
I have a form in which some fields are required only if the value of 
other fields is a specific value. For example, a yes/no question which 
requires more info if "yes" is selected, or a list with an "other" 
option and a field to specify the other option.

What is the best way to validate these additional fields, which are only 
sometimes required? I've been messing with registering validators for 
them, then unregistering them before using is_valid(). This works, 
unless they become required again -- then the validator is no longer 
registered. Registering them again after using is_valid() does not 
appear to work.

Also posted here:
http://www.phpinsider.com/smarty-forum/viewtopic.php?t=6407

thanks,
-josh

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.