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.
If the marriage that was done with official documents meets the conditions of Islamic marriage, then it is valid. These conditions are as follows: the Wali (guardian), two witnesses and consent of both parties. If these conditions are met, then the marriage is valid.
But if any of these conditions is not met, then the marriage is invalid, and the spouses should be separated until a new contract fulfilling the pre-cited conditions is established.
As for any children that result from this invalid marriage, it takes the ruling of a valid one; Ibn Taymiyyah said: “All Muslims are agreed that any marriage where the man has sex with the woman while he believes that their marriage was valid but it is not, then any children that result from this relation are traced back to this man and they inherit from each other. There is consensus of Muslim scholars over this issue even if that marriage was invalid.” [End of quote]
Allah knows best.