Programming instructions
Summary 117
3 Save the page and test it by opening the tripedit.cfm page in your browser.
Testing recommendations:
a In the Trip Edit page entering valid information in all the required fields but the
Photo File field.
b In the Photo File field, enter nowhere.jpg and click Save.
The following error message appears: Trip photo does not exist.
c To avoid the error, replace the invalid photo file name in the Trip Edit page with
somewhere.jpg and click Save.
The following message appears: Trip added.
Summary
As described in this lesson, ColdFusion offers several alternatives to validating data. If
you are familiar with standard page validation code, ColdFusion supports these
development approaches. However, ColdFusion form tags simplify data validation.
Additionally, you can use JavaScript with ColdFusion to execute client-side functions.
In the next lesson
Now that you are sure that your application can save valid data, in the next lesson, you
will write code to add trips to the database. Additionally, you will add logic to update
existing trip data in the Trips table.