Monday, December 17, 2012

Custom Data Annotations in MVC

I don't want to lose this, because I will need it again. Data Annotations are cool, and MVC Foolproof is cool, but sometimes you still need a custom annotation that neither can provide. When that happens, you follow instructions here:

How to handle Booleans/CheckBoxes in ASP.NET MVC 2 with DataAnnotations?Creating Custom Data Annotations that emit Unobtrusive Validation Attributes

and here:

Creating Custom Data Annotations that emit Unobtrusive Validation Attributes

No comments: