Christopher Arndt schrieb:
> Added (with minor modifications). Thanks!
Thank you very much. Unfortunately, I had two errors in my example:
---------------------------------------------------------------
@expose()
@validate(validators={"userid": validators.String()})
def foo(self, userid=None, tg_errors=None):
return self.bar(userid=userid)
@expose()
@validate(validators={"userid": validators.String()})
def foo(self, userid=None, tg_errors=None):
# userid is not validated if the call came from foo()
return userid
---------------------------------------------------------------
The second method must be called "bar" (else the whole example won't work).
Furthermore, this method should use "validators.Int()" and not
"validators.String()"
because this is the core problem: bar() should need a more restrictive
validation
but this is not enforced if the call came from foo().
fs
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Docs" 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-docs?hl=en
-~----------~----~----~----~------~----~------~--~---