126
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.
Input Validation Controls
VALIDATE Entry
Date
Eurodate
Time
Float
Integer
Telephone
Zipcode
Creditcard
Social_security_number
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.
Developing Web Applications with ColdFusion
Description
Verifies US date entry in the form mm/dd/yyy.
Verifies valid European date entry in the form dd/mm/
yyyy.
Verifies a time entry in the form hh:mm:ss.
Verifies a floating point entry.
Verifies an integer entry.
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.
(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.
Blanks and dashes are stripped and the number is
verified using the mod10 algorithm.
Number must be entered as ###-##-####. The hyphen
separator (-) can be replaced with a blank.
Need help?
Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?
Questions and answers