问题描述
我知道 jQuery 验证插件是什么.我知道 jQuery Unobtrusive Validation 库是由 Microsoft 制作的,并且包含在 ASP.NET MVC 框架中.但我找不到解释它是什么的单一在线资源.标准的 jQuery 验证库和不显眼"的版本有什么区别?
I know what the jQuery Validation plugin is. I know the jQuery Unobtrusive Validation library was made by Microsoft and is included in the ASP.NET MVC framework. But I cannot find a single online source that explains what it is. What is the difference between the standard jQuery Validation library and the "unobtrusive" version?
推荐答案
Brad Wilson 有几篇关于 非侵入式验证 和 不显眼的ajax.
在这个 Pluralsight video 中关于AJAX 和JavaScript".
Brad Wilson has a couple great articles on unobtrusive validation and unobtrusive ajax.
It is also shown very nicely in this Pluralsight video in the section on " AJAX and JavaScript".
基本上,它只是 Javascript 验证,不会用自己的验证代码污染您的源代码.这是通过使用 HTML 中的 data-
属性来完成的.
Basically, it is simply Javascript validation that doesn't pollute your source code with its own validation code. This is done by making use of data-
attributes in HTML.
这篇关于什么是 jQuery Unobtrusive 验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!