Unrequired property keeps getting data-val-required attribute

I found the answer. Just add this to Application_Start:

DataAnnotationsModelValidatorProvider.AddImplicitRequiredAttributeForValueTypes = false;

Leave a Comment