Is there a way to update this code to work with Magento2? I believe VarienForm has been depreciated in Magento2 but I can't find a similar JS constructor to get the object.
var AddToCartForm = new VarienForm('#my_form');
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Yes, VarienForm has been depreciated in Magento2.
You can try it;
For details, you can look at this answer.