DataAnnotations in ASP.NET MVC 2 - Stop MVC from applying RequiredAttribute to Non-nullable DateTime
- by jwwishart
Im trying to create a custom version of the RequiredAttribute to replace the built in one and I've got it working for properties that have strings values, but with properties that are DateTime or integer for example, the default RequiredAttribute seems to be applied automatically (IF the property is not nullable!)
My problem is that i want to be…