Any marriage contracted outside the jurisdiction of this state, except a marriage contracted between two persons of the same gender, which is valid by the laws of the jurisdiction in which such marriage was contracted, is valid in this state.
SDCL 25-1-38