User Guide

Table Of Contents
662 Chapter 28: Validating Data
Note: For more information on ColdFusion error handling, see Chapter 14, “Handling Errors,” on
page 307
Selecting a validation technique
The following considerations affect the validation technique that you select:
If you are validating form data, the techniques you use can vary depending on whether you are
using HTML, Flash, or XML forms; for example, different form types have different validation
limitations.
Different validation techniques are appropriate for different form controls and data types.
Available techniques vary depending on when and where you want the data validated; on the
client or the server, when the user enters data or submits a form, or when ColdFusion processes
a variable or function argument.
Each technique has specific features and considerations, such as the form of user feedback,
feature limitations, and so on.
Security issues or concerns that apply to your environment or application can affect the
technique you select.
cfparam tag ColdFusion
variables
On the server, when
the tag executes
ColdFusion MX checks the specified variable.
If the value does not meet the validation
criteria, ColdFusion generates an expression
exception.
For more information on using the
cfparam
tag for validation, see, “Validating data with
the IsValid function and the cfparam tag”
on page 683.
cfargument
tag
UDF and CFC
function
arguments
On the server, when
a function is called or
invoked
ColdFusion MX checks the argument value
when it is passed to the function. If the value
does not meet the validation criteria,
ColdFusion generates an application
exception.
For more information on using the
cfargument
tag, see Chapter 9, “Writing and Calling User-
Defined Functions,” on page 171.
Validation
technique
Applies to Where and when
performed
Description