Praise be to Allah.
It is not permissible for the zaani to marry the zaaniyah except after repenting, because Allah says (interpretation of the meaning):
“The adulterer — fornicator marries not but an adulteress — fornicatress or a Mushrikah; and the adulteress –fornicatress, none marries her except an adulterer — fornicater or a Mushrik [and that means that the man who agrees to marry (have a sexual relation with) a Mushrikah (female polytheist, pagan or idolatress) or a prostitute, then surely, he is either an adulterer — fornicator, or a Mushrik (polytheist, pagan or idolater). And the woman who agrees to marry (have a sexual relation with) a Mushrik (polytheist, pagan or idolater) or an adulterer — fornicator, then she is either a prostitute or a Mushrikah (female polytheist, pagan, or idolatress)]. Such a thing is forbidden to the believers (of Islâmic Monotheism)”
If you both repented to Allah before marriage, then your marriage is valid. But if the marriage contract was done before you repented, then this is a matter concerning which the fuqaha’ differed.
The majority are of the view that the marriage of the zaani and zaaniyah is valid, even if they have not repented.
The Hanbalis are of the view that the marriage of a zaaniyah is not valid unless she repents, but they did not stipulate that the zaani has to repent in order for the marriage to be valid. Al-Insaaf, 8/132; Kashshaaf al-Qinaa‘, 5/83.
According to this view, if you repented before the marriage contract, then the marriage is valid, but to be on the safe side you may do a new marriage contract. Repentance means regretting it and resolving not to go back to that sin. If you regretted falling into haraam and resolved to give it up, and got married, then this is repentance on your part.
With regard to istibra’ (determining that the woman is not pregnant) or ‘iddah, this is also a matter concerning which the fuqaha’ differed. The Hanafis and Shaafa‘is are of the view that it is not necessary.
What we advise you to do is to do a new marriage contract, without telling the wali the real reason for it. That is in order to be on the safe side.
How the marriage contract is to be done is that your wali (guardian) should say to your husband in the presence of two witnesses: “I give my daughter or sister So and so in marriage to you”; and your husband should say: “I accept.”
If it is not possible to do a new marriage contract without telling people of the haraam relationship, then we hope that you do not have to do that, and your marriage remains as it is, based on the majority view that this marriage is valid.
We ask Allah to set your affairs straight and to accept your repentance.
And Allah knows best.