§1. A marriage subject to a condition about the future cannot be contracted validly.
§2. A marriage entered into subject to a condition about the past or the present is valid or not insofar as that which is subject to the condition exists or not.
§3. The condition mentioned in §2, however, cannot be placed licitly without the written permission of the local ordinary.
Source: Code of Canon Law (Vatican.va)