Getting Started Building ColdFusion MX Applications |
|
|
Lesson 4
Validating Data to Enforce Business Rules
In this lesson, you will enhance the Compass Travel Trip Maintenance application. The exercises in this lesson will guide you through the steps of enhancing the application to provide a page for the trip coordinator to add new trip offerings and update existing trips. Further, you will add logic to validate that data entered against Compass Travel business rules.
This lesson explains how to do the following tasks:
- Create a data entry form to capture user input information
- Develop an action page to process posted form variables
- Validate captured data in three ways
ColdFusion tags and functions introduced in this lesson
The following table identifies the ColdFusion tags and functions that you use in this lesson to enhance the ColdFusion application:
Element |
Type |
Description |
cfform
|
Tag |
Builds a form with CFML custom control tags that provide more functionality than standard HTML form input elements. |
cfinput
|
Tag |
Use inside cfform to place radio buttons, checkboxes, or text boxes. Provides input validation for the specified control type. |
cfselect
|
Tag |
Used inside cfform , cfselect lets you construct a drop-down list box form control. You can populate the drop-down list box from a query, or use the option tag. You further use option elements to populate lists. The syntax for the option tag is the same as for its HTML counterpart. |
FileExists
|
Function |
Returns True if the file specified in the argument exists; otherwise it returns False. |
Comments