One of the parties to a complaint for legal separation must be a resident of the state at the time the action is commenced.