Hi Steven,

You should be able to attach the Schema to the validate decorator  
like you were doing:

@validate(validators=SchemaInstance)

or to a Form widget:

form = TableForm(validator=SchemaInstance)

or any CompundWidget subclass:

fieldset = FieldSet(validator=SchemaInstance)

In all cases you should take into account how nested compound widgets  
(like a form or fieldset) are handled. If you want to see some  
examples you can take a look at:
http://trac.turbogears.org/turbogears/browser/tags/0.9a1/turbogears/ 
widgets/tests/test_nested_widgets.py
or
http://trac.turbogears.org/turbogears/browser/tags/0.9a1/turbogears/ 
widgets/tests/test_nested_form_controllers.py


Hope it helps,
Alberto

On Feb 24, 2006, at 3:15 PM, Steven James wrote:
> 3. I had previously made Formencode schemas to validate my forms,  
> using
> @expose(validators=SchemaClass). I'd like to switch to using the new
> widget mechanisms, but can't find a place to hook my  
> chained_validators
> in--for FieldsMatch, etc. I need to have FieldsMatch to verify  
> matching
> password fields.
>


--~--~---------~--~----~------------~-------~--~----~
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