ASP .NET MVC 3 Data Annotations GreaterThan LowerThan for DateTime and int

后端 未结 5 2135
执念已碎
执念已碎 2021-02-13 10:19

I would like to know what is the easiest way to have a \"Greater Than\" & \"Lower Than\" validation on a ASP.NET MVC 3 form?

I use unobtrusive JavaScript for client

5条回答
  •  猫巷女王i
    2021-02-13 10:44

    Could look at the dataannotationsextensions it does Min/Max for int

    Also have a look at a foolproof validation it inlcudes GreaterThan comparison for numeric/datetime etc

提交回复
热议问题