Validation

The Microsoft .NET Framework supports user input and data validation at multiple levels.  Validation can be performed at each level and possibly at all levels.  There are obvious advantages and disadvantages of using the various levels.  The application classes support validation at several levels:

  1. Client-side input validation:  Client-side validation is performed by a set of JavaScript functions.  The JavaScript functions are common across all Iron Speed Designer applications and are stored in the <Iron Speed Folder>\ApplicationWebUIValidation.js file.  Client-side validation reduces the load on servers and gives immediate feedback to the application user without waiting for an answer from the server.  While it is advantageous to use client-side validation, unfortunately not all browsers support client-side validation.  As such, this layer is only used if supported by the browsers.

  2. Server-side input validation: Server-side validation is performed using Microsoft .NET validators.  Server-side validation in done using standard validation specified in the application classes and custom validation that you specify.  The server-side validators include the RequiredFieldValidator (for text boxes, checkboxes, and file upload controls) and MaxLengthValidator (for text boxes).

    The application’s validators extend the standard Microsoft .NET validators to provide additional functionality and they are documented in this section.  The custom validation that you can add to each page is described in more detail in documentation related to the pages.

    Field-level validation:  The application classes provide validation based on the field types supported by Iron Speed Designer.  This validation is provided by the Data Access Layer classes described in a separate section of the online help and is common across all Iron Speed Designer applications.  The field-level validation functions are called for both user input validation as well as import validation.  Since both the import and input functions use this layer, error message reporting is done by throwing exceptions.  Field-level valiation is performed using the Parse method on the Record class when the value is parsed from the user interface controls to the internal value.

  3. Database validation:  You can specify constraints that are checked by the database management system on the Databases pages of Iron Speed Designer.  Iron Speed Designer allows you to specify that a value is unique, or that the value is one of a set of values.

  4. Custom validation:  You can override the Validate method at any of the Record Control class level to add your own custom validation logic.

See Also

Application Class Hierarchy