Because this is a particularly important requirement for database applications, Cold Fusion provides a server-side mechanism for requiring users to enter data in fields. Now, if the user leaves the First Name field empty, Cold Fusion rejects the form submission and returns a message that informs the user the field is required. Another weakness of HTML forms is that you cannot validate data input by users. In order to create robust database applications, data type and range validation are essential. For this reason, Cold Fusion enables you to do several types of data validation.
Data validation is implemented by adding hidden fields to forms.
If the user enters a floating point value, it is rounded to an integer. Does not do any rounding of floating point values. MaxValue Verifies that the numeric value entered is within the specified boundaries. The following examples illustrate the use of hidden fields to validate data. When the FORM is submitted, Cold Fusion scans the form fields to find any validation rules you specified.