jquery.validate新增重置验证方法,将valid替换为resetValid用户体验会更好
This commit is contained in:
@@ -134,7 +134,7 @@ $('#dataGrid').dataGrid({
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
$(element).select2().on("change",function(){$(this).valid()});
|
||||
$(element).select2().on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -142,7 +142,7 @@ $('#dataGrid').dataGrid({
|
||||
// editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
// items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
// itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
// $(element).select2().on("change",function(){$(this).valid()});
|
||||
// $(element).select2().on("change",function(){$(this).resetValid()});
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
|
||||
@@ -263,7 +263,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
$(element).select2().on("change",function(){$(this).valid()});
|
||||
$(element).select2().on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -271,7 +271,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
$(element).select2().on("change",function(){$(this).valid()});
|
||||
$(element).select2().on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -279,7 +279,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
$(element).select2().on("change",function(){$(this).valid()});
|
||||
$(element).select2().on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -287,7 +287,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
$(element).select2().on("change",function(){$(this).valid()});
|
||||
$(element).select2().on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -239,7 +239,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
$(element).select2().on("change",function(){$(this).valid()});
|
||||
$(element).select2().on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -247,7 +247,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
$(element).select2().on("change",function(){$(this).valid()});
|
||||
$(element).select2().on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -255,7 +255,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
$(element).select2().on("change",function(){$(this).valid()});
|
||||
$(element).select2().on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -263,7 +263,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
$(element).select2().on("change",function(){$(this).valid()});
|
||||
$(element).select2().on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -212,7 +212,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
$(element).select2().on("change",function(){$(this).valid()});
|
||||
$(element).select2().on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -220,7 +220,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
$(element).select2().on("change",function(){$(this).valid()});
|
||||
$(element).select2().on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -228,7 +228,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editable:true, edittype:'select', editoptions:{'class':'form-control',
|
||||
items: $.merge([{dictLabel:' ',dictValue:''}], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
$(element).select2().on("change",function(){$(this).valid()});
|
||||
$(element).select2().on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -236,7 +236,7 @@ $("#testDataChildDataGrid").dataGrid({
|
||||
editable:true, edittype:'select', editoptions:{multiple:true, 'class':'form-control',
|
||||
items: $.merge([], ${@DictUtils.getDictListJson('sys_menu_type')}),
|
||||
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
|
||||
$(element).select2().on("change",function(){$(this).valid()});
|
||||
$(element).select2().on("change",function(){$(this).resetValid()});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user