Praise be to Allah.
Is marriage without a wali valid?
The guardian is a condition of marriage being valid according to the majority of scholars. Prophet Muhammad (blessings and peace of Allah be upon him) said: “There is no marriage without a guardian.” (Narrated by Abu Dawud (2085), at-Tirmidhi (1101) and Ibn Majah (1881), from the hadith of Abu Musa al-Ash‘ari; classed as sahih by al-Albani in Sahih at-Tirmidhi)
So this marriage of yours was not valid according to the majority of jurists; the Malikis, Shafi‘is and Hanbalis.
Is marriage without witnesses valid?
As for the Hanafis, they regard it 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-Hidayah (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 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 Malik’s view in which he (may Allah have mercy on him) stipulated the condition of announcing the marriage with no need for witnesses.”
It says in Badai‘ as-Sanai‘ (2/252):
“Most of the scholars said that having witnesses is a condition of the marriage being valid . Malik 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 ‘Abbas (may Allah be pleased with him) from the Messenger of Allah (blessings and peace of Allah be upon him) that he said: “The zaniyah (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 zaniyah 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…
Is marriage with a single witness valid?
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.”
Should marriage witnesses be of good character?
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-Shafi'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.”
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 Maliki madhhab, if the marriage contract was not witnessed by two witnesses, then it was announced later on, because Malik 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 haram and invalid.” (Al-Fatawa al-Fiqhiyyah al-Kubra, 4/105)
Al-Isnawi said in at-Tamhid fi Takhrij al-Furu‘ ‘ala al-Usul (p. 654):
“Al-Qarrafi said in Sharh al-Mahsul 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 Malik, 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 Hanifah, or without witnesses, following the view of Malik, 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-Rafi‘i said, because both imams agree that the marriage is invalid in that case.”
In conclusion, you did well to repent to Allah from that haram 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 haram.
Please see this category for more about the Conditions of Marriage.
And Allah knows best.