I’ve gotten quite a few requests for the source code behind the RIA Services Validation blog post series. I am pleased to announce that the code is now published on GitHub.
Within that repository, you’ll find:
- RudeValidation.Web/Models – Server-side model classes
- RudeValidation.Web/Validators – Custom validators including CompareValidator, ConditionallyRequired, and DateValidator
- RudeValidation/Views – Sample screens showing the validation in action
- RudeValidation/ViewModels - Where you’ll find the sample ViewModel as well as the very simple ViewModelBase
If you’re not familiar with Git, don’t be intimidated. You can easily view the code directly in your browser by starting out at http://github.com/jeffhandley/RIAServicesValidation and just clicking through the folders and files. To download all of the source, just click the Downloads button, and click to download the Zip file. As always when downloading a Zip from the tubes, be sure to Unblock the Zip file through the Properties window before you extract the contents. Then, be sure to set the RudeValidation.Web project as the startup. After that, you are welcome to do whatever you want with the source code included.
RIA Services Validation Recap
Over the course of a 10-post series, we learned about the standard validators, how to create different types of custom validators, how the validation attributes get propagated, how to perform common cross-field and cross-entity validation, and now we have a utility for importing model rules into ViewModel classes. Here’s the full series: