Zend certified PHP/Magento developer

Hide button if error message is active

I have a site built with Magento 2.3. In checkout cart, I want to hide the button that proceed to checkout if the quantity of a product pass the maximum quantity. How can I do this? Thank you!