added the validation to cart.php