Partager via


Design of the Validation Application Block

The Validation Application Block is designed to do the following:

  • 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 the application has been deployed, and ensure that changes happen simultaneously and consistently.

Design Highlights

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

Ff664748.6961b126-5633-4cd8-bcfe-c5376488e3d6(en-us,PandP.50).png

Figure 1: Diagram of Validation Application Block

The client code can call the methods of the ValidatorFactory façade to create a validator and validate objects.