Hi

I've a form with nested compund widgets and I'm a littlebit lost  about how to 
write a "complex" validation schema. 

Simplyfied the form result looks like the following dictionary.

{ 'basics': {'defaultgateway': {'ip_part_4': 111, 'ip_part_1': 111, 
'ip_part_3': 111, 'ip_part_2': 111}, 'enabledisable': True}}


I'd like to write a validation schema, which returns valid if:
*) enabledisable in 'basics' is True and all the ip_part fields in the 
'defaultgateway' are not empty
*) enabledisable is False the ip_part fields should not be validated (they 
should be ignored) and the result should be true in any case

My problem is I couldn't find a documentation how to write a nested validation 
schema. I can write a schema for single fields, or for one compound widget, 
but I can't figure out how to validate the widgets of two levels at the same 
time.

Thanks in advance for any help

Kind regards
Joseph Wenninger

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to