You are viewing documentation for v1.0.x. Change

verifies()

Description

Tells Wheels to verify that some specific criterias are met before running an action.

Function Syntax

verifies([ only, except, post, get, ajax, cookie, session, params, handler ])

Parameters

Parameter Type Required Default Description
only string No Pass in a list of action names (or one action name) to tell Wheels that the verifications should only be run on these actions.
except string No Pass in a list of action names (or one action name) to tell Wheels that the filter function(s) should be run on all actions except the specified ones.
post any No Set to true to verify that this is a post request.
get any No Set to true to verify that this is a get request.
ajax any No Set to true to verify that this is an AJAX request.
cookie string No Verify that the passed in variable name exists in the cookie.
session string No Verify that the passed in variable name exists in the session.
params string No Verify that the passed in variable name exists in the params.
handler string No Pass in the name of a function that should handle failed verifications (default is to just abort the request when a verification fails).

Examples

<!--- Tell Wheels to verify that the `handleForm` action is always a post request when executed --->
<cfset verifies(only="handleForm", post=true)>