jquery.validate新增重置验证方法,将valid替换为resetValid用户体验会更好

This commit is contained in:
thinkgem
2019-05-15 17:42:01 +08:00
parent a2d9c846bf
commit 1b66126184
7 changed files with 18 additions and 18 deletions

View File

@@ -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()});
// }
// }
// },

View File

@@ -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()});
}
}
},

View File

@@ -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()});
}
}
},

View File

@@ -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()});
}
}
},