Export (0) Print
Expand All

Integrating 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 work with:

  • ASP.NET
  • Windows Forms
  • WCF

Integration allows you reuse the validators that are associated with your application classes when you perform validation at the user-interface level (for ASP.NET and Windows Forms applications) or at the message-sending level of a multi-tiered application (for WCF applications). By integrating the Validation Application Block with your applications, you can reuse your validation rules across several levels of your system architecture.

The integration provided by the Validation Application Block at the user-interface level:

  • Provides a way to associate properties of validated application objects with user-interface controls.
  • Provides a way to convert values from an input data type to an application-specific data type. For example, you can convert a string input to a System.DateTime value.
  • Helps avoid coding errors in type names and property names. For example, it throws exceptions when type names or property names cannot be found.
  • Does not require instances of application objects to be created in order for validators to be invoked at the user-interface level. In other words, you do not need to instantiate a Customer object just to check if an input string entered by the user meets the validation requirements of the Customer.Name property.

The integration provided by the Validation Application Block for the message-passing level allows you to validate WCF messages, data contracts and parameters.

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