Hi all,

i'm having a problem getting an InvariantsValidator working on a grouped form 
using z3c.form. Imagine the following setup:

class GroupOne(Group):
        fields = Fields(IMyForm).select('second_attribute', 'third_attribute')

class GroupTwo(Group):
        fields = Fields(IMyForm).select('fourth_attribute', 'fifth_attribute')

class MyForm(GroupForm, Form):
        fields = Fields(IMyForm).select('first_attribute')
        groups = (GroupOne, GroupTwo)

Now, the z3c.form.validator.Data object passed to my InvariantsValidator only 
contains the 'first_attribute'. I think this is caused by line 190 in field.py:

def validate(self, data):
        fields = self.form.fields.values()

Why is this method only looking for form.fields and not aggregating form.fields 
and possible form.groups?

Is it an unsupported use case, or am i just not getting it?

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to