Conditions imposing restraints upon marriage, except upon the marriage of a minor, or of the widow of the person by whom the condition is imposed, are void. This does not affect limitations when the intent was not to forbid marriage but only to give the use until marriage.
N.D.C.C. § 47-02-25