How to change 'data-val-number' message validation in MVC while it is generated by @Html helper

后端 未结 14 1672
面向向阳花
面向向阳花 2020-11-28 03:44

Assume this model:

Public Class Detail
    ...
    
    
         


        
14条回答
  •  执念已碎
    2020-11-28 04:32

    Or you can simply do this.

    @Html.ValidationMessageFor(m => m.PercentChange, "Custom Message: Input value must be a number"), new { @style = "display:none" })
    

    Hope this helps.

提交回复
热议问题