类型错误:验证在jquery.validate.js未定义 [英] TypeError: validator is undefined in jquery.validate.js
问题描述
我有如下形式。
当我单击转到下一节按钮,我可以直接在这种形式下一部分。
但现在当我点击我没有得到任何回应,我不能转到下一个页面我得到以下error.But只发生在Firefox这个错误,我曾经更改调试到Chrome浏览器中运行。
类型错误:验证是不确定的FILE_PATH / jquery.validate.js
块引用>这是错误观点。
错误观点1
在我点击以上观点,我可以看到下面的视图
错误观点2
Bugzilla的调试指出以下部分(
[IF(validator.settings.rules)]
)的jquery.validate.js
文件的错误STATICRULES:功能(元素){
变种规则= {};
VAR验证= $。数据(element.form,验证);
如果(validator.settings.rules){
规则= $ .validator.normalizeRule(validator.settings.rules [element.name])|| {};
}
返回规则;
},
解决方案我相信你需要更新你的HTML和更改
< DIV CLASS =形横>
到<窗体类=形横>
。不要忘记更新结束标记为好。I have following form.
once I click that Go to Next Section Button I can direct to next section in this form.
Here the whole code for this view and this the Layout file for that view page
But now Once I click I'm not getting any response and I cannot goto next page I'm getting following error.But this error occur in Firefox only , once I change debugging to Chrome this is working.
TypeError: validator is undefined file_path/jquery.validate.js
this is that error view
Error view 1
once I click above view I can see below view
Error view 2
Bugzilla debugger pointed out following section (
[if (validator.settings.rules)]
) ofjquery.validate.js
file has the errorstaticRules: function( element ) { var rules = {}; var validator = $.data(element.form, "validator"); if ( validator.settings.rules ) { rules = $.validator.normalizeRule(validator.settings.rules[element.name]) || {}; } return rules; },
解决方案I believe you need to update your HTML and change
<div class="form-horizontal">
to<form class="form-horizontal">
. Don't forget to update the closing tag as well.这篇关于类型错误:验证在jquery.validate.js未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!