§1. A marriage which is invalid because of an impediment or a defect of legitimate form can be sanated provided that the consent of each party perseveres.
§2. A marriage which is invalid because of an impediment of natural law or of divine positive law can be sanated only after the impediment has ceased.
Source: Code of Canon Law (Vatican.va)