All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ʻalayhi wa sallam, is His slave and Messenger.
We have previously explained the criteria of a valid marriage contract in fatwa 83629, among the most important of which are the presence of the bride's wali (legal guardian) and witnesses. If the marriage contract was conducted in the presence of your wali and those you mentioned only, then the problem in your case is the absence of the witnesses. According to the majority of scholars, a woman cannot act as a witness in the marriage contract. Also, the bride's wali cannot act as a witness in the marriage contract; he has a vested interest in marrying off the woman under his care and guardianship.
In addition, the scholars held different views regarding the validity of accepting learning the Quran and teaching it as a mahr; some of them maintained that it is valid, while others held otherwise.
Hence, the marriage contract conducted in the manner described in the question is not valid, as you have been told.
We draw your attention to the obligation of repenting to Allaah of that former prohibited relationship.
Allaah knows best.