We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ae4d3b6 + d29d1b0 commit a1baa6cCopy full SHA for a1baa6c
app/code/Magento/Backend/view/adminhtml/web/js/validate-store.js
@@ -47,12 +47,19 @@ define([
47
_saveHandler: function (form) {
48
var formData = {},
49
requestData = {},
50
+ counts = {},
51
options = $.data(form, 'validator').settings;
52
53
if ($(form).validation('isValid')) {
54
$.each($(form).serializeArray(), function () {
55
+ counts[this.name] = (counts[this.name] || 0) + 1;
56
+
57
+ if (formData[this.name]) {
58
+ this.name = this.name.replace(new RegExp(/\[\]$/g), '[' + (counts[this.name] - 1) + ']');
59
+ }
60
formData[this.name] = this.value || '';
61
});
62
63
requestData = {
64
action: $(form).attr('action'),
65
data: formData
0 commit comments