<cfif>blocks checking for the existence and types of variables. You also can limit your actions' scopes to specific request types like
post, get, and AJAX requests.
updateactions are from form submissions. All other requests will be aborted.
handlerfunction registered with the handler argument.
incorrectRequestType()function as the handler:
edit.cfmpage, what you probably did was write some code at the top of that looked like this:
edit.cfmhad to have the
userIdin the form scope and that
userIdhad to be of type
guid. If these conditions weren't met, the request was redirected to the
index.cfmpage. This was a very tedious but necessary task.
userIdvariable exists in the
params.userIdis of type
indexaction and place an error key in the Flash containing the message "Invalid user ID."
paramsTypeseach accept a list so you can include as many variables to check against as you want.
paramslist matches the number types to check against in the
paramsTypeslist. This also goes for the
cookie/cookieTypesarguments, which check for existence and type in the
addressstruct are both present in the
paramsstruct and also that
userIdis of a certain type:
address.zipCodeis correct). Because the
addressstruct will be passed in to the model, the validation will be performed there.