mte wrote:
> Hi,
> Let's say I have this:
>
> fieldset = widgets.FieldSet("myfs", fields=[widgets.TextField("mytf"),
> ...])
>
> When submitting, the fieldset is passed as a dict. How to write a
> validation schema in order to access the fields in the dict?
Just attach the Schema to "fieldset":
class MySchema(Schema):
myft = Int
fieldset = widgets.FieldSet("myfs", fields=[widgets.TextField("mytf")],
validator=MySchema)
The form that includes this fieldset will automatically include
MySchema in it's resulting schema.
Alberto
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---