Localizing validation messages at client side by jQuery in ASP.net MVC

后端 未结 1 506
我寻月下人不归
我寻月下人不归 2021-02-03 15:18

I am using jquery for client side validation together with data annotations. Everything is working fine but I would like to localize a message when a non numeric value is entere

1条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-03 16:01

    Maybe a bit more elegant way is to rewrite System.Web.Mvc.ClientDataTypeModelValidatorProvider class and replace it in ModelValidatorProviders.Providers collection.

    See section Implicit Non-Numeric-Field problem in http://jwwishart.blogspot.com/2011/03/custom-server-and-client-side-required.html for more details.

    0 讨论(0)
提交回复
热议问题