Commits

Rock Howard committed 4f6be4d

  • Participants
  • Parent commits 762dcc2

Comments (0)

Files changed (1)

Documentation.wiki

 def update(....
 }}}
 
-If data sent to an action that is decorated with a @validate action does not pass the forms {{{is_clean}}} method, Piston will return an error to the client, and will not execute the action.
+If data sent to an action that is decorated with a @validate action does not pass the forms {{{is_clean}}} method, Piston will return an error to the client, and will not execute the action. If the validation passes, then the form object is attached to the request object. Thus you can get to the form (and thus the cleaned_data) via {{{request.form}}} as in this example:
+
+{{{
+@validate(EchoForm, 'GET')
+def read(self, request):
+    return {'msg': request.form.cleaned_data['msg']}
+}}} 
 
 === Helpers, utils & @decorators ===