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.
1 parent 3bf65d3 commit df1c97aCopy full SHA for df1c97a
lib/web/mage/validation/validation.js
@@ -15,7 +15,20 @@ define([
15
function (value, element) {
16
let inputValue = parseFloat($(element).val()) || 0;
17
18
- return inputValue > 0;
+ if (inputValue < 0) {
19
+ return false;
20
+ }
21
+
22
+ // eslint-disable-next-line one-var
23
+ let $allInputs = $(element)
24
+ .closest('.fieldset')
25
+ .find('input[data-validate*="validate-grouped-qty"]');
26
27
+ if ($allInputs.first().is(element)) {
28
+ return $allInputs.toArray().some(input => parseFloat($(input).val()) > 0);
29
30
31
+ return true;
32
},
33
$.mage.__('Please specify the quantity of product(s).')
34
],
0 commit comments