企业库验证模块Asp.Net MVC 2的客户端验证实现 [英] Asp.Net MVC 2 Client validation implementation for Enterprise Library Validation Block

查看:146
本文介绍了企业库验证模块Asp.Net MVC 2的客户端验证实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经找到了<一个href=\"http://bradwilson.typepad.com/blog/2009/10/enterprise-library-validation-example-for-aspnet-mvc-2.html\"相对=nofollow>有关如何在MVC 2使用EntLib验证模块用于服务器验证的非常好的文章。
但是因为有人士指出

I've found a very good article about how to use EntLib Validation Block for server validation in MVC 2. But as there pointed out

EntLib的验证应用程序块的当前设计采用了复合模式;也就是说,当我们要求确认一个对象,这回返回一个包含所有验证工作的清单做一个验证器对象。虽然这是从一个正常的使用场景很方便,不幸的副作用是,我们不能偷看里面的看什么个人验证是它做的,因此不能生成相应的客户端验证提示

The current design of EntLib’s Validation Application Block uses the Composite pattern; that is, when we ask for validation for an object, it returns back a single validator object that contains a list of all the validation work to be done. While this is very convenient from a normal usage scenario, the unfortunate side-effect is that we can’t "peek inside" to see what the individual validations are that it’s doing, and therefore can’t generate the appropriate client-side validation hints.

那么怎么可能实现客户端验证EntLib?有没有解决?

So how is it possible to implement client side validation for EntLib? Is there work around?

推荐答案

所以我找不到这事,所以我desided实现它在我自己的将其发布在codePLEX的 HTTP://elvalweb.$c$cplex.com/

So I could not find anything about this, so I desided to implement it on my own an publish it on codeplex http://elvalweb.codeplex.com/

这篇关于企业库验证模块Asp.Net MVC 2的客户端验证实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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