| Contents > Developing ColdFusion MX Applications > Using ColdFusion Variables > Validating data types |
|
|
|
|
||
It is often not sufficient that input data merely exists; it must also have the right format. For example, a date field must have data in a date format. A salary field must have data in a numeric or currency format. There are many ways to ensure the validity of data, including the following methods:
cfparam tag with the type attribute to validate any variable.input tag with a hidden attribute to validate the contents of a form input field. For information on this technique, see Validating form field data types.cfform controls that have validation attributes. For more information, see Building Dynamic Forms.cfqueryparam tag in a SQL WHERE clause to validate query parameters. For information on this technique, see Using cfqueryparam.Note: Data validation using the cfparam, cfqueryparam, and form tags is done by the server. Validation using cfform tags is done using JavaScript in the user's browser, before any data is sent to the server.
|
|
||
| Contents > Developing ColdFusion MX Applications > Using ColdFusion Variables > Validating data types |
|
|
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/variab47.htm