Friday, November 22, 2002, 4:20:13 PM, Dave Watts wrote:
> If I recall correctly, the seven reserved suffixes are:
> _date
> _eurodate
> _time
> _integer
> _float
> _reserved
> _range
> I'm sure they're listed somewhere in the documentation, but I haven't
> a clue as to where.
Chapter 6 of "Developing ColdFusion Applications":
Validating form field data types
One limitation of standard 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 following table describes the hidden field suffixes that you can use
to do validation:
Field Value Description
Suffix Attribute
_integer Custom error message Verifies that the user entered a number.
If the user enters a floating point value,
it is rounded to an integer.
_float Custom error message Verifies that the user entered a number.
Does not do any rounding of floating
point values.
_range MIN=MinValue Verifies that the numeric value entered
MAX=MaxValue is within the specified boundaries.
You can specify one or both of the
boundaries separated by a space.
_date Custom error message Verifies that the user entered a date
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 the user correctly entered
a time and converts the time to the proper
ODBC time format.
_eurodate Custom error message Verifies that the user entered a date in a
standard European date format and converts
into the proper ODBC date format.
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.
[example omitted]
--
Chris Montgomery monty @ airtightweb.com
Airtight Web Services http://www.airtightweb.com
Web Development, Web Project Management, Software Sales
210-490-3249/888-745-7603
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm