withForm { // good request }.invalidToken { // bad request }
withForm
method requires the use of the useToken
attribute in a form<g:form useToken="true" ...>
withForm
method to handle valid and invalid requests:withForm { // good request }.invalidToken { // bad request }