Yes, this is the intent.  This way the original values from failed
validation can be passed back to the error handlers.

On Feb 23, 8:29 am, Christoph Zwerschke <[email protected]> wrote:
> You can use the following to see
> the different behavior:
>
> ------------ TG1 --------------
>
> @expose('foo.templates.welcome')
> def index(self):
>     return dict(now='time')
>
> @expose()
> @error_handler(index)
> @validate(validators=dict(a=validators.Int))
> def validate(self, a):
>     return
>
> ------------ TG2 --------------
>
> @expose('foo.templates.index')
> def index(self):
>     return dict(page='index')
>
> @expose()
> @validate(validators=dict(a=validators.Int),
>           error_handler=index)
> def validate(self, a):
>     return
>
> -------------------------------
>
> If you surf tohttp://localhost:8080/validate?a=b,
> then in TG1 you are redirected to the index page without problems,
> but in TG2 you get TypeError:
> index() got an unexpected keyword argument 'a'
>
> -- Christoph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to