(a)  General rule.–Where there has been no confirmation by cohabitation following the removal of an impediment, the supposed or alleged marriage of a person shall be deemed void in the following cases:

(1)  Where either party at the time of such marriage had an existing spouse and the former marriage had not been annulled nor had there been a divorce except where that party had obtained a decree of presumed death of the former spouse.

(2)  Where the parties to such marriage are related within the degrees of consanguinity prohibited by section 1304(e) (relating to restrictions on issuance of license).

(3)  Where either party to such marriage was incapable of consenting by reason of insanity or serious mental disorder or otherwise lacked capacity to consent or did not intend to consent to the marriage.

(4)  Where either party to a purported common-law marriage was under 18 years of age.

(b)  Procedures.–In all cases of marriages which are void, the marriage may be annulled as set forth in section 3303 (relating to annulment of void and voidable marriages) or its invalidity may be declared in any collateral proceeding.