I had the same problem except my template code’s newlines were turning into \n. Removed these and it started workin again.
I’m also having this exact same problem. Updating a post results in this error.
Doesnt work for me either: on the product page I can still enter any quantity. It only works on the cart page for me.