O'Reilly logo

Silverlight 4 Data and Services Cookbook by Kevin Dockx, Gill Cleeren

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required