The Validation Application Block
Any application that accepts input either from users or from other systems must ensure that the information is valid in terms of some set of rules that you specify. For example, when processing an order, you may need to check that a customer's phone number has the correct number of digits or that a date falls within a particular range. In addition, if the validation fails, you may need to send an error message that explains what is wrong.
The Enterprise Library Validation Application Block provides useful features that allow developers to implement structured and easy-to-maintain validation scenarios in their applications. In addition, the Validation Application Block includes adapters that allow you to use the application block with the following technologies:
- ASP.NET
- Windows® Communication Foundation (WCF)
- Windows Presentation Foundation (WPF)
- Windows Forms
This section includes the following topics that will help you to understand and use the Validation Application Block:
- What Does the Validation Application Block Do? This topic provides a brief overview that will help you to understand what the block can do, and explains some of the concepts and features it incorporates. It also provides a simple example of how you can write code to use the block.
- When Should I Use the Validation Application Block? This topic will help you to decide if the block is suitable for your requirements. It explains the benefits of using the block, and alternative techniques you may consider.
- Developing Applications Using the Validation Application Block. This topic explains how to include the Validation Application Block in your applications and how to configure it. It also contains more detailed information, such as how to create custom message templates and information on how validation works with inheritance.
- Key Scenarios. This topic shows different ways to use the Validation Application Block in your own applications.
- Design of the Validation Application Block. This topic includes a class diagram of the Validation Application Block.
- Extending and Modifying the Validation Application Block. This topic explains how to extend the application block by adding custom validators and attributes. It also contains advice about how to modify the source code.
- Deployment and Operations. This topic explains how to deploy and update the application block assemblies. It also explains the application block's instrumentation.
More Information
For related information, see the following patterns & practices guides: