advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Download the sample application for this article.
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
 

New Features in Enterprise Library 3.0: Validation Block

Avoid the tedious and error-prone task of writing validation "plumbing" code by integrating the Validation Application Block into your .NET applications. 


advertisement
lmost any application you write that accepts input requires some sort of validation to meet the business requirements. One example is when you need to validate user-entered or externally acquired data before persisting it in the database. .NET provides a rich set of features for handling validation; but even so, developers sometimes find themselves writing the same type of validation "plumbing" code repeatedly. To help solve this, Enterprise Library 3.0 ships with a new Validation Application Block that abstracts this plumbing code in the form of a reusable library that you can use in any .NET application. This article introduces the Validation Application Block and provides working examples of how you can use it to write robust validation code.


Introducing the Validation Application Block
The Validation Application Block includes a comprehensive library of common validation rules that apply to primitive data types. These include rules for validating string lengths, date ranges, regular expressions and so on. You can leverage these validators directly from within your code (programmatically or in the form of declarative attributes) or from a configuration file. When the built-in validation does not satisfy your requirements, the Validation Block gives you the option of creating custom validator classes.

It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



advertisement