Praise be to Allah
The guardian is a condition of marriage being valid according to the majority of scholars, because the Prophet (blessings and peace of Allah be upon him) said: “There is no marriage without a guardian.” Narrated by Abu Dawood (2085), at-Tirmidhi (1101) and Ibn Maajah (1881), from the hadith of Abu Moosa al-Ash‘ari; classed as saheeh by al-Albaani in Saheeh at-Tirmidhi.
So this marriage of yours was not valid according to the majority of fuqaha’, the Maalikis, Shaafa‘is and Hanbalis.
As for the Hanafis, they regard it is permissible to get married without a guardian, but they stipulate that two witnesses must be present, who can hear the marriage contract from both parties. If two witnesses are not present, then the marriage is not valid according to them.
It says in al-Hidaayah (1/190): The marriage of two Muslims cannot be done except in the presence of two adult, sane, free Muslim witnesses, two men or a man and two women, regardless of whether or not they are of good character or have been subjected to a hadd punishment for slander.
It should be noted that the presence of witnesses is a condition of the marriage being valid, because the Prophet (blessings and peace of Allah be upon him) said: “There is no marriage without witnesses.” This hadith is an argument against Maalik’s view in which he (may Allah have mercy on him) stipulated the condition of announcing the marriage with no need for witnesses. End quote.
It says in Badaa’i‘ as-Sanaa’i‘ (2/252): Most of the scholars said that having witnesses is a condition of the marriage being valid. Maalik said that there is no condition stipulating the presence of witnesses; rather the condition stipulates that the marriage must be announced, so that if someone does the marriage contract and stipulates the condition of announcing it, it is valid even if no witnesses were present, but if witnesses are present and he stipulates that they must conceal the marriage, then it is not valid…
We have the following hadith to support this view (that the presence of witnesses is required): It was narrated from the Messenger of Allah (blessings and peace of Allah be upon him) he said: “There is no marriage without witnesses.” And it was narrated that he said: “There is no marriage without two witnesses.” It was narrated from ‘Abdullah ibn ‘Abbaas (may Allah be pleased with him) from the Messenger of Allah (blessings and peace of Allah be upon him) that he said: “The zaaniyah (fornicatress) is the one who gives herself in marriage without any proof (witnesses).” But if having witnesses present was not a condition of marriage, she would not be described as a zaaniyah in the event of no witnesses being present, because there is a need to ward off the accusation of zina from her, and this accusation cannot be warded off except by having witnesses present, as this is an accusation that cannot be warded off except when the marriage contract becomes known to others and becomes famous, and it cannot become known to others except by the words of witnesses…
One of the conditions stipulated is the number of witnesses. A marriage contract cannot be done with one witness, because the Prophet (blessings and peace of Allah be upon him) said: “There is no marriage without witnesses,” and: “There is no marriage without two witnesses.”
With regard to the witness being of good character, that is not a condition of the marriage contract being valid in our view. So a marriage contract may be done in the presence of two evildoers. According to ash-Shaafa‘i it is a condition, and the marriage contract cannot be done except in the presence of witnesses who appear to be of good character. End quote.
Based on that, what happened between you is not regarded as a marriage according to the Hanafis, because it was not done in the presence of two witnesses.
It cannot be said that it was a valid marriage according to the Maaliki madhhab, if the marriage contract was not witnessed by two witnesses, then it was announced later on, because Maalik stipulated that the guardian be present.
Therefore if the marriage contract was done without the presence of the guardian and without the presence of two witnesses, then it is invalid. It is not valid according to any of the scholars.
Ibn Hajar al-Makki said: az-Zarkashi said, commenting on what the author said: Such as a marriage without a guardian or witnesses. What he meant was a marriage without a guardian only, or a marriage without witnesses only, not a marriage that was lacking both. If both are lacking, then there is consensus that it is haraam and invalid.
End quote from al-Fataawa al-Fiqhiyyah al-Kubra (4/105).
Al-Isnawi said in at-Tamheed fi Takhreej al-Furoo‘ ‘ala al-Usool (p. 654):
Al-Qarraafi said in Sharh al-Mahsool that it is stipulated when following another madhhab (other than one’s regular madhhab) that it should not lead to a situation where both the first and second madhhabs are agreed that something is invalid. If someone follows Maalik, for example, in his view that wudu’ is not invalidated by touching without desire, then he must rub his body and wipe all of his head, otherwise his prayer is invalid according to both imams. End quote.
Al-Isnawi said: One of the examples of this issue is if he gets married without a guardian, following the view of Abu Haneefah, or without witnesses, following the view of Maalik, and consummates the marriage. He is not to be subjected to the hadd punishment in this case. But if he gets married without a guardian and without witnesses either, then he is to be subjected to the hadd punishment, as ar-Raafi‘i said, because both imams are agreed that the marriage is invalid in that case. End quote.
Conclusion: you did well to repent to Allah from that haraam relationship, and we ask Allah, may He be exalted, to accept your repentance and increase you in guidance and righteousness.
Do not tell anyone about it, neither your guardian nor any suitor, for the believer is enjoined to conceal his faults. What happened is not regarded as marriage; rather it was messing about and was haraam.
For more information, please see question no. 153671
And Allah knows best.