How to limit quantity of items in cart

I want to limit the quantity of some products so that user cannot place order quantity of more than that
is there a way to do