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 293293 <scopeLabel >[GLOBAL]</scopeLabel >
294294 <validation >
295295 <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 >
297297 </validation >
298298 <label translate =" true" >Maximum Qty Allowed in Shopping Cart</label >
299299 <dataScope >max_sale_qty</dataScope >
Original file line number Diff line number Diff line change @@ -626,6 +626,13 @@ define([
626626 } ,
627627 $ . mage . __ ( 'Please enter a number greater than 0, without comma in this field.' )
628628 ] ,
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+ ] ,
629636 'validate-css-length' : [
630637 function ( value ) {
631638 if ( value !== '' ) {
You can’t perform that action at this time.
0 commit comments