Agreements entered into prior to the date of marriage are premarital or prenuptial agreements. Generally speaking and subject to some notable exceptions, under current California law, parties who intend to marry (or become domestic partners) are free to define their respective property rights however they want so long as their premarital agreement addresses the same issues addressed in the Family Code. In the absence of a premarital agreement, marriage and post-dissolution rights and obligations are determined by the Family Code.
Premarital agreements are not the same as "marital agreements" or "marital settlement agreements". Marital agreements are agreements made between two people during marriage. Marital settlement agreements are agreements made between two married people after a petition for dissolution of marriage has been filed and in anticipation of a judgment of dissolution. While the subject matter may be the same, significantly different rules apply.
The motivation of the person seeking a premarital agreement usually falls into one of two categories: (1) the spouse with the assets wants his or her separate property assets protected in the event of a divorce; or (2) the spouse who holds few, if any, assets is giving up a career to stay home and raise a family and, thus, wants to be financially compensated for the loss of his or her career.
The law of premarital agreements is very technical in some respects and unless carefully crafted, they may not be enforceable. A premarital agreement should only be drafted by a qualified family law attorney. This is not a do-it-yourself area of law.