手动绑定Ajax请求后jQuery验证 [英] Manually bind JQuery validation after Ajax request

查看:120
本文介绍了手动绑定Ajax请求后jQuery验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我请求ASP.net MVC视图到现场框和视图中包含已标记了属性由jQuery的不显眼的验证使用插件的表单字段。

I'm requesting an ASP.net MVC view into a live box and the view contains form fields that have been marked up with attributes to be used by JQuery's unobtrusive validators plug-in.

客户端脚本不然而工作和我的理论是,其因为验证框架仅被触发在其上早已由MVC视图已经装入活框中时间传递网页加载

The client script is not however working and my theory is that its because the validation framework is only being triggered on page load which has long since passed by the time the MVC view has been loaded into the live box.

因此​​,我怎么可以让验证框架知道它有新的表单字段来修复?

Thus how can I let the validation framework know that it has new form fields to fix up?

干杯,伊恩。

推荐答案

您可以看看的的以下博客帖子。这里的<一个href=\"http://weblogs.asp.net/imranbaloch/archive/2011/03/05/unobtrusive-client-side-validation-with-dynamic-contents-in-asp-net-mvc.aspx\">another 之一。

You may take a look at the following blog post. And here's another one.

这篇关于手动绑定Ajax请求后jQuery验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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