![MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual Download Page 94](http://html1.mh-extra.com/html/macromedia/coldfusion-4-5-developing-web/coldfusion-4-5-developing-web_develop-manual_3286369094.webp)
68
Developing Web Applications with ColdFusion
example, if you want the error message to read "You must enter your first name," use
the syntax:
<INPUT TYPE="hidden"
NAME="FirstName_required"
VALUE="You must enter your first name.">
Validating the Data That Users Enter in Form Fields
Another limitation of HTML forms is that you cannot validate that users input the type
or range of data you expect. ColdFusion enables you to do several types of data
validation by adding hidden fields to forms. The hidden field suffixes you can use to do
validation are as follows:
Note
Adding a validation rule to a field does not make it a required field. You
need to add a separate
_required
hidden field if you want to ensure user
entry.
Form Field Validation Using Hidden Fields
Field Suffix
Value Attribute
Description
_integer
Custom error
message
Verifies that the user enters a number. If the
user enters a floating point value, it is
rounded to an integer.
_float
Custom error
message
Verifies that the user enters a number. Does
not do any rounding of floating point values.
_range
MIN=MinValue
MAX=MaxValue
Verifies that the numeric value entered is
within the specified boundaries. You can
specify one or both of the boundaries
separated by a space.
_date
Custom error
message
Verifies that a date has been entered and
converts the date into the proper ODBC date
format. Will accept most common date forms,
for example, 9/1/98; Sept. 9, 1998).
_time
Custom error
message
Verifies that a time has been correctly entered
and converts the time to the proper ODBC
time format.
_eurodate
Custom error
message
Verifies that a date has been entered in a
standard European date format and converts
into the proper ODBC date format.
Summary of Contents for COLDFUSION 4.5-DEVELOPING WEB
Page 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Page 14: ...xiv Developing Web Applications with ColdFusion...
Page 26: ...xxvi Developing Web Applications with ColdFusion...
Page 34: ...8 Developing Web Applications with ColdFusion...
Page 70: ...44 Developing Web Applications with ColdFusion...
Page 84: ...58 Developing Web Applications with ColdFusion...
Page 114: ...88 Developing Web Applications with ColdFusion...
Page 148: ...122 Developing Web Applications with ColdFusion...
Page 174: ...148 Developing Web Applications with ColdFusion...
Page 208: ...182 Developing Web Applications with ColdFusion...
Page 244: ...218 Developing Web Applications with ColdFusion...
Page 274: ...248 Developing Web Applications with ColdFusion...
Page 288: ...262 Developing Web Applications with ColdFusion...
Page 300: ...274 Developing Web Applications with ColdFusion...
Page 350: ...324 Developing Web Applications with ColdFusion...
Page 362: ...336 Developing Web Applications with ColdFusion...