Compartilhar via


Integrating with ASP.NET, WPF, Windows Forms, and 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, WPF, 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 does the following:

  • It provides a way to associate properties of validated application objects with user-interface controls.
  • It 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.
  • It helps avoid coding errors in type names and property names. For example, it throws exceptions when type names or property names cannot be found.
  • It 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 whether 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.

The Validation Application Block is designed to integrate with a range of presentation technologies. For details, see the flowing topics: