Twitter About Home

Quick update

Just wanted to raise some awareness of Mike Saunders’s interesting Validation Aspects project, which he’s just written an xVal rules provider for. Validation Aspects is a validation framework for WPF and ASP.NET MVC. It’s built using aspect-oriented programming (AOP) technology, which means it can inject rule-enforcing code directly into your property setters. At the moment this doesn’t fit totally seamlessly with ASP.NET MVC’s built-in model binder, but it has potential to work great with the forthcoming RC version of ASP.NET MVC.

Published Jan 24, 2009

Since it’s now compatible with xVal, it automatically does client-side validation too.

What’s coming to xVal

I’ve been busy lately working on SQL Server 2008 stuff (oddly enough), but as soon as I’m through with that I’ll try and find time to enhance xVal in the following ways:

  • Support for ASP.NET MVC Release Candidate (assuming it’s available)
  • Support for NHibernate Validator, yet another server-side validation framework. This one’s closely integrated into NHibernate. Integrating this with xVal simply means that it will do client-side validation easily. I’ve already written most of the rules provider for this.
  • Support for comparison validators (e.g., “return date cannot be before departure date”) and set validators (e.g., “you must enter A, B, or C”)
  • Improved internationalization – so all the default error messages come out localized, regardless of whether the client-side library (jQuery Validation, ASP.NET native validation) offers internationalization
  • Documentation on how to apply custom validation logic

Other feature requests are welcome.

READ NEXT

xVal – a validation framework for ASP.NET MVC

Update: The version of xVal presented in this post (and in its downloadable demo project) has been superseded by a newer version with extra features. This post is still a good introduction to the concept, but to download the latest version of xVal please go to http://xval.codeplex.com. Thanks!

Published Jan 10, 2009