Validating the DataForm
Validation of your data is a requirement for almost every application to make sure that no invalid input is possible. If you're using a DataForm
, you can easily implement validation by using Data Annotations on your classes or properties. This control picks up these validation rules automatically and even provides visual feedback. In this recipe, you'll learn how to implement this kind of validation for a DataForm
.
Getting ready
We're starting from the solution that we competed in the Displaying and editing a collection using the DataForm recipe. If you didn't complete that recipe, you can find a starter solution located in the Chapter05\Dataform_Validation_Starter
folder in the code bundle that is available on the Packt ...
Get Silverlight 4 Data and Services Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.