Section 14. If the validity of a marriage is doubted, either party may institute an action for annulling such marriage, or if it is denied or doubted by either party, the other party may institute an action for affirming the marriage. Such action shall be commenced in the same manner as an action for divorce, and all the provisions of chapter two hundred and eight relative to actions for divorce shall, so far as appropriate, apply to actions under this section. Upon proof of the validity or nullity of the marriage, it shall be affirmed or declared void by a judgment of the court, and such judgment of nullity may be made although the marriage was solemnized out of the commonwealth, if at that time and also when the action was commenced the plaintiff had his domicile in the commonwealth, or if he had resided in this commonwealth for five years last preceding the commencement of said action, unless the court finds that he has removed into this commonwealth for the purpose of obtaining said judgment.
The register of probate shall, within two days after the expiration of the appeal period following the entry of a judgment annulling a marriage, or if an appeal was taken within two days after entry of final judgment pursuant to a rescript of the appellate court, send an attested copy thereof to the commissioner of public health, the clerk or registrar of the city or town in the commonwealth where the marriage was solemnized, and the clerk or the registrar of each city and town in the commonwealth where a party to the marriage dwelt at the time of the marriage. The commissioner of public health and every clerk or registrar to whom such an attested copy is sent shall, forthwith upon receipt of such copy, enter upon the margin of his record of the marriage a note of reference to the judgment of annulment.