添加表单提交时验证结果,防止firefox在校验不通过时仍能提交的现象
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
<script type="text/javascript" src="${ctxStatic}/pages/scripts/specificServiceForm/specificServiceFormCfg.js"></script>
|
||||
<title></title>
|
||||
<script type="text/javascript">
|
||||
var validateForm;
|
||||
$(document).ready(function() {
|
||||
jQuery.validator.addMethod("maxValue", function(value, element) {
|
||||
return value >=0&&value<2100000000;
|
||||
@@ -41,7 +42,7 @@
|
||||
},"该配置包含下级配置,不得改为叶子节点");
|
||||
|
||||
$("#name").focus();
|
||||
$("#inputForm").validate({
|
||||
validateForm = $("#inputForm").validate({
|
||||
rules:{
|
||||
specServiceId:{
|
||||
required:true,
|
||||
@@ -91,7 +92,7 @@
|
||||
},
|
||||
|
||||
submitHandler: function(form){
|
||||
if(!validateItem()) {
|
||||
if(!validateForm.form()) {
|
||||
return false;
|
||||
}
|
||||
loading('正在提交,请稍等...');
|
||||
|
||||
Reference in New Issue
Block a user