Export (0) Print
Expand All

Design of the Validation Application Block

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.

The Validation Application Block is designed to:

  • Encapsulate the logic used to perform the most common validation tasks into minimal application code.
  • Relieve developers of the requirement to write duplicate code and custom code for common validation tasks.
  • Allow validation rules to be changed after they have been deployed and to ensure that changes happen simultaneously and consistently.

Design Highlights

Figure 1 illustrates the interrelationships between the key classes in the Validation Application Block.

Ff650651.EL-VAB-DES(en-us,PandP.10).gif

Figure 1: Diagram of Validation Application Block

The client code can call the Validation façade, which allows you to create a validator and validate an object with a single line of code. Alternatively, it can call the ValidationFactory class to create a validator and then call the Validate method on the Validator class to perform the check.

The class diagram shows the various kinds of validators and attributes provided by the Validation Application Block. These are described in the previous sections.

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Enterprise Library information can be found at the Enterprise Library site.
Show:
© 2014 Microsoft