On Tue, 2006-14-11 at 07:56 -0200, José de Paula Eufrásio Júnior wrote:
> iain duncan escreveu:
> > I am trying to make a simple custom validator following the docs on the
> > form encode site, and all appears to work except that on invalidation I
> > get:
> > 
> > NameError: global name 'Invalid' is not defined
> > 
> > Do I need to import more than validators? or should I be defining this
> > validator in a special place?
> 
> hmm...
> 
> import turbogears.validators as v
> 
> 
> ....
> 
> raise v.Invalid(...
> 
> Invalid is on the validators namespace. I have gone thru something 
> similar trying to catch SQLAlchemy exceptions without importing them 
> first... :P
> 
> []s
> core

Thanks!



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