Created
February 26, 2021 19:03
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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