Christopher Arndt schrieb:
> You mean controller methods named "validate"?
yes
> Could you provide a (non-working) example for this too, just for clarity?
------------------------------------------------------------------------------
@expose()
@validate(validators={"userid": validators.Int()})
def validate(self, userid=None, tg_errors=None):
if not isinstance(userid, int):
if tg_errors == None:
return "no validation, userid=" + str(userid)
else:
return "validation failed, userid=" + str(userid)
else:
return "validation passed, userid=" + str(userid)
------------------------------------------------------------------------------
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
-~----------~----~----~----~------~----~------~--~---