Dynamically prevent products in cart from being purchased
We have products that can only be purchased before certain times, e.g. customers can't purchase on the day of delivery.
This is implemented via a field attached to the line item that stores the dates the customer intends to purchase the product for.
How can we require that the dates are still in the future at checkout review time?
I realise this doesn't fully solve the problem of a customer ordering a product for the past, but does deal with our common case of a user creating a cart, then coming back much later and completing the order.