No marriage shall be adjudged a nullity on the ground that one of the parties was under the age of legal consent if it appears that the parties had voluntarily cohabited together as husband and wife after having attained such age; nor shall the marriage of any person who lacks the mental capacity to make decisions be adjudged void after restoration to reason, if it appears that the parties freely cohabited together as husband and wife after such restoration.