DataAnnotationsModelValidatorProvider.AddImplicitRequiredAttributeForValueTypes = false;
Add this line to your Application_Start
method from Global.asax
. By default MVC adds [Required]
attribute to non-nullable value types (because you can't convert a null
into a bool
, it must be a bool
).