Skip to content

Instantly share code, notes, and snippets.

@cagartner
Created February 26, 2021 19:03
Show Gist options
  • Save cagartner/5ab49052234b7032f7babf8c1f3149eb to your computer and use it in GitHub Desktop.
Save cagartner/5ab49052234b7032f7babf8c1f3149eb to your computer and use it in GitHub Desktop.
Magento 2 - Validation Add to Cart form on input change - not on submit
require([
'jquery',
'Magento_Catalog/product/view/validation'
], function($){
$('#qty').on('input', function () {
$('#product_addtocart_form').validation('isValid');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment