Asp.net MVC源码分析--Model Validation(Client端)实现(2)(4)
来源:未知 责任编辑:责任编辑 发表时间:2013-11-26 22:14 点击:次
15 $.each(this.adapters, function () {
16 var prefix = "data-val-" + this.name,
17 message = $element.attr(prefix),
18 paramValues = {};
19
20 if (message !== undefined) { // Compare against undefined, because an empty message is legal (and falsy)
21 prefix += "-";
22
23 $.each(this.params, function () {
24 paramValues[this] = $element.attr(prefix + this);
25 });
26
27 this.adapt({
28 element: element,
29 form: form,
30 message: message,
31 params: paramValues,
32 rules: rules,
33 messages: messages
34 });
35 }
36 });
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>