Int or Number DataType for DataAnnotation validation attribute

前端 未结 8 2498
我寻月下人不归
我寻月下人不归 2020-12-07 10:41

On my MVC3 project, I store score prediction for football/soccer/hockey/... sport game. So one of properties of my prediction class looks like this:

[Range(0         


        
8条回答
  •  忘掉有多难
    2020-12-07 10:57

    almost a decade passed but the issue still valid with Asp.Net Core 2.2 as well.

    I managed it by adding data-val-number to the input field the use localization on the message:

    
    

提交回复
热议问题