All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
What happened here is that this woman got married before Istibraa' (making sure that she was not pregnant) from Zina fornication. The jurists differed in opinion about the ruling of such marriage in this case; some of them are of the view that the marriage contract is valid, and others are of the view that this marriage is void.
Therefore, the marriage is valid based on the view of the scholars who consider it to be valid.
We should point out that this woman must sincerely repent to Allah fulfilling the conditions of sincere repentance, which have been highlighted in fatwas 86527 and 87903.
She must also beware of anything that could lead to temptation and committing Zina again, such as being in seclusion with non-Mahram (marriageable) men, forbidden mixing, and the like. She should not have told you or anyone else about having committed Zina because the Islamic Sharia commands us to conceal our sins.
Allah knows best.