User Guide

Table Of Contents
About ColdFusion MX validation 661
onSubmit
(
validateat=
"onSubmit"
attribute)
cfinput and
cftextarea tags
On the client when
the user clicks
Submit
In HTML or XML format, the validation logic
is identical to onBlur validation, but the test is
not done until the user submits the form.
In Flash format, this validation type is identical
to onBlur Validation. Flash checks do not
differentiate between the two events for
validation.
onServer
(
validateat=
"onServer"
attribute)
cfinput and
cftextarea tags
On the server when
ColdFusion gets the
submitted form
ColdFusion MX checks submitted data for
validity and runs a validation error page if the
data is not valid. You can use the
cferror tag
to specify the validation error page.
hidden field All Forms,
including
HTML-only
forms
On the server when
ColdFusion gets the
submitted form
ColdFusion MX uses the same validation
logic as with onServer validation, but you
must create additional, hidden, fields and you
can use this technique with HTML tags or
CFML tags.
For detailed information on using hidden
fields, see “Validating form data using hidden
fields” on page 675.
JavaScript
(
onValidate
="function"
attribute)
cfgrid, cfinput,
cfslider,
cftextarea, and
cftree tags in
HTML and
XML format
forms
On the client, when
the user clicks
Submit, before field-
specific onSubmit
validation
ColdFusion MX includes the specified
JavaScript function in the HTML page it
sends to the browser, and the browser calls it.
For detailed information on using JavaScript
for validation, see “Validating form input and
handling errors with JavaScript”
on page 680.
IsValid
function
ColdFusion
variables
On the server, when
the function
executes
ColdFusion MX tests the variable to
determine whether it follows a specified
validation rule and the function returns true or
false.
For more information on using the
IsValid
function for validation, see “Validating data
with the IsValid function and the cfparam tag”
on page 683.
Validation
technique
Applies to Where and when
performed
Description