Excerpts from Ian Wilson's message of Sat Feb 20 05:52:10 -0300 2010:
> Hello hello,
> 
> You probably want to create a chained form validator.  Then apply the
> validators to the combo fields manually depending on if your checkbox
> is True or False.  There are other ways to do this but I've created a
> pastie of one.  You can mess around and see if it fits what you need.
> 
> http://pylonshq.com/pasties/c1f9f9dffaf13a25f3d13b03bc09a472
> 
> Hope it helps.
> 
> -Ian

Ian, thank you so much for taking the time to build the example and the
guidance. I will play with it to see if I can make it fit my needs.

Mariano

> 
> On Fri, Feb 19, 2010 at 7:14 PM, Mariano Mara <[email protected]> wrote:
> > Hi everyone,
> >  I have three validations on a schema (one for a checkbox with a
> >  StringBool validation and two combo boxes using OneOf validations) and I
> >  want to enforce validation on combos if the check box is true, otherwise
> >  I want FormEncode to ignore them.
> >  I checked FormEncode documentation and found a lot of what seems good
> >  candidates for this (prevalidators, compound.Any, state attribute) but
> >  after trying several options I cannot see how to make them work
> >  together.
> >  If someone can share an advice to put me on the right track, I will
> >  appreciate it.
> >
> > TIA,
> > Mariano
> >
> 

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to