本地化内置验证异常 [英] Localize built-in validation exceptions

查看:61
本文介绍了本地化内置验证异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I无法找到有关如何本地化从Entity Framework中抛出的验证消息的信息。我想这些例外是从ValidationAttribute(Stringlength,Range…)派生出
。我无法看到如何使用资源来本地化这些消息。
  我不是在谈论自定义验证,而是在谈论实体框架中的内置验证。

I can’t find information about how to localize validation messages thrown from Entity Framework. I suppose that these exceptions are derived from ValidationAttribute (Stringlength, Range…). I can’t see how to use resources to localize these messages.  I’m not talking about custom validation, I’m talking about built-in validation in Entity Framework.

Ulf.Ason

Ulf.Ason

推荐答案

您好Ulf,

感谢您的帖子。

请您提供有关例外情况的更多信息。实体框架中有许多验证。

Would you please give us more information about your exceptions. There are many validations in Entity Framework.

感谢您的理解。

祝您有个愉快的一天。


这篇关于本地化内置验证异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆