Skip to content

Commit 5725c92

Browse files
committed
MAGETWO-62728: My Wishlist - quantity input box issue
- Adding maxlength to input validation
1 parent 5c70bb7 commit 5725c92

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Wishlist/view/frontend/templates/item/column

1 file changed

+1
-1
lines changed

app/code/Magento/Wishlist/view/frontend/templates/item/column/cart.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $product = $item->getProduct();
2121
<div class="field qty">
2222
<label class="label" for="qty[<?= $block->escapeHtmlAttr($item->getId()) ?>]"><span><?= $block->escapeHtml(__('Qty')) ?></span></label>
2323
<div class="control">
24-
<input type="number" data-role="qty" id="qty[<?= $block->escapeHtmlAttr($item->getId()) ?>]" class="input-text qty" data-validate="{'required-number':true,'validate-greater-than-zero':true}"
24+
<input type="number" data-role="qty" id="qty[<?= $block->escapeHtmlAttr($item->getId()) ?>]" class="input-text qty" data-validate="{'required-number':true,'validate-greater-than-zero':true,'maxlength':8}"
2525
name="qty[<?= $block->escapeHtmlAttr($item->getId()) ?>]" value="<?= /* @noEscape */ (int)($block->getAddToCartQty($item) * 1) ?>">
2626
</div>
2727
</div>

0 commit comments

Comments
 (0)