C#中的验证框架? [英] Validation framework in C#?

查看:134
本文介绍了C#中的验证框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Java世界中,有一个bean验证框架 JSR -303 ,这是一种经过深思熟虑的策略,可在应用程序的表示层和持久层中执行数据验证.它涵盖了很多内容,包括整个图形模型的验证,验证域分组,i18n等.

In the java world there is the bean validation framework JSR-303 which is a nicely well thought out strategy for performing data validation in both the presentation and persistence layers of an application. It covers a lot of things, including validation of whole graph models, validation domain grouping, i18n, etc.

我未能在C#中找到任何数据模型验证框架.是否有与C#中的JSR-303类似的东西?

I have failed to find any data model validation frameworks in C#. Are there anything similar to JSR-303 in C#?

推荐答案

有企业库验证"块. http://msdn.microsoft.com/en-us/library/ff648831.aspx

There is the Enterprise Library Validation block. http://msdn.microsoft.com/en-us/library/ff648831.aspx

它可能没有开箱即用地提供您要查询的某些特定项目,但它适合许多其他用例.

It may not do some of the specific items you are asking about (i18n) out of the box, but it fits the bill for many other use cases.

还可以免费使用并提供源代码.

Also, is free to use and has source code available.

这篇关于C#中的验证框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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