ASP.NET MVC optional field being treated as required

前端 未结 6 2031
被撕碎了的回忆
被撕碎了的回忆 2020-12-15 02:57

I have this field that for some reason when I click on submit, gets a validation message that the field is required.

[DisplayName(\"Total Budget:\")]
public          


        
6条回答
  •  死守一世寂寞
    2020-12-15 03:57

    Use [NotMapped] annotation , this removes the required validation in the flow you also use own display attributes

提交回复
热议问题