Validating the input in the cart