File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
CatalogInventory/view/adminhtml/ui_component
Ui/view/base/web/js/lib/validation Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 293
293
<scopeLabel >[GLOBAL]</scopeLabel >
294
294
<validation >
295
295
<rule name =" validate-number" xsi : type =" boolean" >true</rule >
296
- <rule name =" validate-greater-than-zero" xsi : type =" boolean" >true</rule >
296
+ <rule name =" validate-nonempty-number- greater-than-zero" xsi : type =" boolean" >true</rule >
297
297
</validation >
298
298
<label translate =" true" >Maximum Qty Allowed in Shopping Cart</label >
299
299
<dataScope >max_sale_qty</dataScope >
Original file line number Diff line number Diff line change @@ -626,6 +626,13 @@ define([
626
626
} ,
627
627
$ . mage . __ ( 'Please enter a number greater than 0, without comma in this field.' )
628
628
] ,
629
+ 'validate-nonempty-number-greater-than-zero' : [
630
+ function ( value ) {
631
+ return ! isNaN ( utils . parseNumber ( value ) )
632
+ && value > 0 && ( / ^ \s * - ? \d + ( [ , . ] \d + ) * \s * % ? \s * $ / ) . test ( value ) ;
633
+ } ,
634
+ $ . mage . __ ( 'Please enter a number greater than 0, without comma in this field.' )
635
+ ] ,
629
636
'validate-css-length' : [
630
637
function ( value ) {
631
638
if ( value !== '' ) {
You can’t perform that action at this time.
0 commit comments