of the big benefits of using
CFFORM over standard
HTML forms is the built-in data validation that is available. Both
tags have an attribute called
accepts any of the following values:
Validates the form field data using the mod10 algorithm. Credit-card numbers can be entered as a single number or with dashes or spaces. ColdFusion automatically strips dashes and spaces before validating.
Requires the form-field value to be in the U.S. date format mm/dd/yyyy.
Requires the form-field value to be in the European date format dd/mm/yyyy.
Requires the form-field value to be a floating-point number.
Requires the form-field value to be an integer.
Requires the form-field value to be a U.S. social security number in the format xxx-xx-xxxx or xxx xx xxxx.
Requires the form-field value to be a U.S. telephone number formatted either xxx-xxx-xxxx or xxx xxx xxxx. The area code and exchange are required to begin with a number in the range of 1-9.
Requires that the form-field value be entered as a valid time using the format hh:mm:ss.
Requires that the form-field value be entered as either a five- or nine-digit U.S. ZIP code using the format xxxxx, xxxxx-xxxx, or xxxxx xxxx.
In addition to the
VALIDATE attribute, the
CFTEXTINPUT tags as well as the
CFTREE tags support an additional attribute for ...