Skip to content

Commit a774aad

Browse files
committed
MC-17605: Unable to save edited product when max_sale_qty is Magento's default
1 parent e1211b6 commit a774aad

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/code/Magento/CatalogInventory/etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
</field>
5656
<field id="max_sale_qty" translate="label" type="text" sortOrder="4" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
5757
<label>Maximum Qty Allowed in Shopping Cart</label>
58-
<validate>validate-number</validate>
58+
<validate>validate-number validate-greater-than-zero</validate>
5959
</field>
6060
<field id="min_qty" translate="label" type="text" sortOrder="5" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
6161
<label>Out-of-Stock Threshold</label>

app/code/Magento/CatalogInventory/view/adminhtml/ui_component/product_form.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@
285285
<settings>
286286
<scopeLabel>[GLOBAL]</scopeLabel>
287287
<validation>
288+
<rule name="validate-number" xsi:type="boolean">true</rule>
288289
<rule name="validate-greater-than-zero" xsi:type="boolean">true</rule>
289290
</validation>
290291
<label translate="true">Maximum Qty Allowed in Shopping Cart</label>

0 commit comments

Comments
 (0)