Data validation

Data validation is carried out on data submitted in transactions to ensure that the data satisfies certain requirements expressed in validation rules.

Data can be validated by levels, for controller or business components, and by types, for internal or external types.

Data can be validated at two levels:
  • Controller level: Used to process as many validations as possible at the pre-transaction stage. Most validations are performed at the controller level as opposed to the business component-level, in order to improve performance.
  • Business component level: Used for validations that can only be done as the transaction is carried out.
There are also two types of validation:
  • Internal: To maintain database integrity. This code is generally not accessible to developers and administrators
  • External: Validates content, and uses information accessible and modifiable by developers and administrators.

The following diagram shows how the validation levels and types work together.

Data validation levels and types