Cold Fusion Validation
Cold Fusion employs hidden form fields to validate the contents of user-entered data. Here is a hidden field that ensures that a text box is not empty:
<input type="hidden" name="companyName_required" VALUE="Please provide a company name">
The name of the field determines the actual form element being validated and the type of validation required. The field's value contains the message to be displayed if validation fails. In this case, Cold Fusion will require the form element 'companyName' to contain a value. Other types of validation are supported for most kinds of available form elements.
CF validation will get the job done, but it requires extra trips to the server when validation errors occur. While you can specify a validation message, it will be displayed on a rather pedestrian page, no matter how elegantly your site is designed. The user must press the Back button to return to the form to make corrections, and in some cases, this will wipe out the contents of the form. I can't think of a better way to annoy a user.
Revised: Sept. 8, 2000