Globally localize validation

后端 未结 2 1190
醉梦人生
醉梦人生 2020-12-09 14:01

I\'m using System.ComponeneModel.DataAnnotations attributes such as Required and StringLength. Is it possible to localize its error messages globally?

I know I can d

2条回答
  •  忘掉有多难
    2020-12-09 14:29

    For MVC3 see DataAnnotationsResources. It's "RequiredAttribute_ValidationError" and more. You may solve it by installing .NET Framework language pack(s).

    See also

提交回复
热议问题