diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/ActionGroup/StorefrontValidateThreeGroupedProductQtyErrorMessageActionGroup.xml b/app/code/Magento/GroupedProduct/Test/Mftf/ActionGroup/StorefrontValidateThreeGroupedProductQtyErrorMessageActionGroup.xml
new file mode 100644
index 0000000000000..10b90b6011c5f
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/ActionGroup/StorefrontValidateThreeGroupedProductQtyErrorMessageActionGroup.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ Validates Child Products Quantities Input Error Messages are displaying
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Section/StorefrontProductInfoMainSection.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Section/StorefrontProductInfoMainSection.xml
index d5c0666e0b1a9..cb281b6fad61b 100644
--- a/app/code/Magento/GroupedProduct/Test/Mftf/Section/StorefrontProductInfoMainSection.xml
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Section/StorefrontProductInfoMainSection.xml
@@ -1,8 +1,8 @@
@@ -14,6 +14,7 @@
+
diff --git a/app/code/Magento/GroupedProduct/Test/Mftf/Test/StoreFrontValidateGroupedProductQuantityInputErrorMessageTest.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Test/StoreFrontValidateGroupedProductQuantityInputErrorMessageTest.xml
new file mode 100644
index 0000000000000..3593315d7aba5
--- /dev/null
+++ b/app/code/Magento/GroupedProduct/Test/Mftf/Test/StoreFrontValidateGroupedProductQuantityInputErrorMessageTest.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/web/mage/validation/validation.js b/lib/web/mage/validation/validation.js
index 578d7968c4732..5f8a15ac75738 100644
--- a/lib/web/mage/validation/validation.js
+++ b/lib/web/mage/validation/validation.js
@@ -14,25 +14,19 @@ define([
'validate-grouped-qty': [
function (value, element, params) {
var result = false,
- total = 0;
+ total = 0,
+ valInt;
- $(params).find('input[data-validate*="validate-grouped-qty"]').each(function (i, e) {
- var val = $(e).val(),
- valInt;
+ if (value && value.length > 0) {
+ result = true;
+ valInt = parseFloat(value) || 0;
- if (val && val.length > 0) {
- result = true;
- valInt = parseFloat(val) || 0;
-
- if (valInt >= 0) {
- total += valInt;
- } else {
- result = false;
-
- return result;
- }
+ if (valInt >= 0) {
+ total += valInt;
+ } else {
+ return false;
}
- });
+ }
return result && total > 0;
},