
227 Cal.App.2d 615 (1964)
JOAN WILSON HAAS, Plaintiff and Appellant,
v.
EDWARD HAAS, Defendant and Respondent.
Civ. No. 27990. 
California Court of Appeals. Second Dist., Div. One.  
June 3, 1964.
 Kenny, Morris & Ibanez, Robert W. Kenny and Eleanor Jackson Piel for Plaintiff and Appellant.
 Spencer Brandeis and Ellis J. Horvitz for Defendant and Respondent. *616
 FOURT, Acting P. J.
 Plaintiff appeals from an interlocutory judgment of divorce entered "in favor of defendant and cross complainant and against plaintiff and cross defendant and from the whole thereof."
 The chronology of significant events is as follows:
 On August 3, 1962, plaintiff filed a complaint for separate maintenance. Therein she alleged that defendant had treated her with extreme cruelty and had wrongfully inflicted grievous mental suffering.
 On August 28, 1962, defendant filed his answer to plaintiff's complaint. Among other things he denied the alleged cruelty. In addition to his answer, defendant filed a cross-complaint for divorce. Therein defendant alleged that he "is now and for more than one year last past has been a resident of the State of California, and for more than three months last past has been and now is a resident of the county of Los Angeles." Defendant charged cruelty as a ground for divorce.
 On September 4, 1962, plaintiff filed her answer to defendant's cross- complaint.
 On May 22, 1963, plaintiff filed a "First Amended Complaint For Divorce (Cruelty)" wherein she alleged that defendant "and cross complainant is now and for more than one year last past has been a resident of the County of Los Angeles, State of California."
 The cause was called for trial on May 22, 1963. The minute order of that date provides in pertinent part as follows: "... an opening statement is made by plaintiff and defendant. Joan Haas is sworn and testifies on behalf of the plaintiff. Plaintiff's motion that the 1st Amended Complaint for Divorce be amended to include in the prayer the request that plaintiff be restored her maiden name of Joan Wilson is granted. Defendant's motion to strike plaintiff's 1st amended complaint for divorce is argued and submitted upon the filing of the last points and authorities, 5--5, plaintiff to open. ... The plaintiff rests. Marilyn Liebmann is sworn and testifies on behalf of the defendant. The defendant rests. ... Both sides rest. Cause will stand submitted upon the filing of the last points and authorities, XX--XX--X, plaintiff to open." (Italics added.)
 The minute order dated June 19, 1963, provides in pertinent part as follows: "... the court now renders its decision as follows: Plaintiff's first Amended Complaint for Divorce is ordered striken [sic]. ... A decree of separate maintenance is denied to the plaintiff. An Interlocutory Judgment of *617 Divorce Is Granted To The Defendant and Cross-Complainant. ..." (Italics added.)
 On July 3, 1963, the findings of fact, conclusions of law, and judgment were filed. Judgment was entered July 5, 1963, and this appeal followed.
 Plaintiff's first contention is that the trial court erred in striking her amended complaint for divorce. The question presented may be stated as follows:
 Where the party who first asserts a cause of action for divorce (in this case it was defendant by his cross-complaint) has satisfied the residence requirements set forth in Civil Code, section 128, may the party against whom the divorce is sought (in this case it was plaintiff in the action for separate maintenance) also then attempt to obtain a divorce even though the latter party has not satisfied the residence requirements?
 It would appear that the question presented is one of first impression in this state. We believe that the answer thereto is in the affirmative for the reasons hereinafter set forth.
 [1] Marriage is a matter of public concern. The public, through the state, has interest in both its formation and dissolution. The state which has that interest is the state of domicile. (Aldabe v. Aldabe, 209 Cal.App.2d 453 [26 Cal.Rptr. 208].) [2] The regulation of marriage and divorce is solely within the province of the Legislature except as the same might be restricted by the Constitution. (McClure v. Donovan, 33 Cal.2d 717 [205 P.2d 17]; Beeler v. Beeler, 124 Cal.App.2d 679 [268 P.2d 1074].) [3] The requirement of residence set forth in Civil Code, section 128,  [fn. 1] is synonymous with domicile. (Smith v. Smith, 45 Cal.2d 235 [288 P.2d 497]; Ungemach v. Ungemach, 61 Cal.App.2d 29 [142 P.2d 99].)
 [4] The court cannot grant a divorce to either party without proof that at least one of the parties satisfies the residence mandate of Civil Code, section 128. (Coleman v. Coleman, 23 Cal.App. 423 [138 P. 362].) The mandate is *618 satisfied if either the original plaintiff or cross-complainant has been a resident for the period required. (Rethers v. Rethers, 140 Cal.App.2d 28 [294 P.2d 968].)
 [5] When defendant, who satisfied the residence requirements, filed his cross-complaint for divorce, the court was vested with jurisdiction to dissolve the marriage. Once jurisdiction has attached there is no logical reason for holding that the jurisdiction is limited solely to granting a divorce to defendant on his cross-complaint. To so hold would be to place form above substance.
 The question of whether a person who is not a resident could, in the first instance, file a complaint for divorce based upon defendant's residence is not before us.
 [6] The trial court erred in striking plaintiff's amended complaint for divorce. However, under the circumstances of this case the error was not prejudicial.
 Even though the trial court struck the amended complaint for divorce, the complaint for separate maintenance was still before it. The trial court found (Finding of Fact VII) that "defendant did not treat plaintiff with extreme cruelty, nor did he wrongfully inflict upon her grievous mental suffering." Substantial evidence supports this determination.
 Since alleged mental cruelty served as the basis for both plaintiff's complaint for separate maintenance and her amended complaint for divorce, and since the trial court found against plaintiff on the issue of cruelty, plaintiff sustained no prejudice from the trial court's striking the amended complaint for divorce.
 The judgment is affirmed.
 Lillie, J., and Kincaid, J. pro tem.,  [fn. *] concurred.
 "A divorce must not be granted unless the plaintiff has been a resident of the state one year, and of the county in which the action is brought three months, next preceding the commencement of the action; provided, that a cross-complainant in an action for divorce need not be or have been a resident of the state or of the county in which the action is brought or pending in order to entitle such cross-complainant to a divorce in said action; ..." (Italics shown.)
NOTES
[fn. 1]  1. Civil Code, section 128, provides in part as follows:
[fn. *]  *. Retired judge of the superior court sitting pro tempore under assignment by the Chairman of the Judicial Council.
