Can some one tell me what I am doing wrong here.

I have that code inspired from this http://docs.turbogears.org/1.0/ 
ValidateDecorator#schema-validation and the validator doesn't work.  
tg_error is always None


class TXfileValidator(validators.Schema):
     addr_from = validators.Email(not_emtpy=True)
     recipient = validators.Email(not_emtpy=True)


class Root(controllers.RootController):

     ...

     @expose(template="txfile.templates.sent")
     @validate(validators=TXfileValidator())
     def send(self, addr_from, recipient, tg_errors=None, **kw):
         print tg_errors
         print kw


Thanks for you help.
-fred-

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

Reply via email to