Actually, not so bad.   You can validate get parameters, or post
parameters but not URL args.

This is something we need to work out for 2.1 because it's now come up
two or three times.

On Mon, Mar 23, 2009 at 9:48 AM, Christoph Zwerschke <[email protected]> wrote:
>
> Am I doing something fundamentally wrong or is there a problem with the
> validate decorator in TG 2.0rc1?
>
> I'm using it in the very basic way as described here:
> http://turbogears.org/2.0/docs/main/Validation.html#validating-arguments-without-form-widgets
>
> To reproduce the problem, quickstart an application, add the following
> at the top of controllers/root,
>
> from tg import validate
> from formencode import validators
>
> and change the index method of the root controller like this:
>
>   �...@expose('foo.templates.index')
>   �...@validate(validators=dict(nr=validators.Int()))
>    def index(self, nr=None):
>        ...
>
> Now run the application and surf to http://localhost:8080/index/1.
>
> The validator should pass, but I'm getting this:
> TypeError: index() got multiple values for keyword argument 'nr'
>
> -- Christoph
>
> >
>



-- 
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog

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