126
Developing Web Applications with ColdFusion
Input Validation with CFFORM Controls
The CFINPUT and CFTEXTINPUT tags include the VALIDATE attributes which allows
you to specify a valid data type entry for the control. You can validate user entries on
the following data types.
When you specify an input type in the VALIDATE attribute, ColdFusion tests for the
specified input type when the form is submitted and submits form data only on a
successful match. A true value is returned on successful form submission, false if
validation fails.
Input Validation Controls
VALIDATE Entry
Description
Date
Verifies US date entry in the form mm/dd/yyy.
Eurodate
Verifies valid European date entry in the form dd/mm/
yyyy.
Time
Verifies a time entry in the form hh:mm:ss.
Float
Verifies a floating point entry.
Integer
Verifies an integer entry.
Telephone
Verifies a telephone entry. Telephone data must be
entered as ###-###-####. The hyphen separator (-) can
be replaced with a blank. The area code and exchange
must begin with a digit between 1 and 9.
Zipcode
(U.S. formats only) Number can be a 5-digit or 9-digit
zip in the form #####-####. The hyphen separator (-)
can be replaced with a blank.
Creditcard
Blanks and dashes are stripped and the number is
verified using the mod10 algorithm.
Social_security_number
Number must be entered as ###-##-####. The hyphen
separator (-) can be replaced with a blank.
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...