She married without her wali’s consent and the marriage contract was done without her being present
Question

                I got married a while ago to a man with a marriage contract done by a lawyer, because of certain circumstances, on the basis that when things changed, we would get married in the presence of a notary public, in sha Allaah. In the marriage contract all the clauses were valid and the witnesses were the lawyer himself and his partner. But I was not present because circumstances did not allow that, and it was essential that the matter be done so the marriage contract was done without me being present. Because we trusted the lawyer and he trusted us. When my husband brought the marriage contract we put our hands on the Holy Qur'aan and exchanged vows of marriage according to the laws of Allaah and His Messenger and according to the madhhab of Imam Abu Haneefah, and we lived as man and wife until my husband travelled. 

My question is: is what happened halaal or haraam? Because I have started to get worried and I am afraid that what happened was not done properly, because I was not present and the witnesses did not hear me.
Praise be to Allah.
    Firstly: 

    We are very upset to hear of the Muslims toying to such an 
    extent with the marriage contract which Allaah calls “a firm and strong 
    covenant” [al-Nisa’ 4:21].  

    We are astounded by this audacity in transgressing the sacred 
    limits of Allaah.  

    Would this lawyer or the husband or the witnesses agree for 
    his daughter or sister to be married in such a way, without his knowledge or 
    consent? 

    We do not think that anyone who has any kind of manhood or 
    decency would accept that for his daughter or sister, so why would they 
    accept it for the daughters of other people? 

     Moreover, with regard to these witnesses, what did they 
    witness? The wife was not present, and they did not hear from her or from 
    her guardian that she agreed to this marriage. It is not permissible for a 
    witness to bear witness to anything but that which he knows. As for the 
    lawyer or anyone else simply being trustworthy, that does not make it 
    permissible for them to bear witness to something that they do not know. 

    Secondly: 

    The marriage contract done in this manner is not valid, 
    because it is not valid for a woman to give herself in marriage, rather it 
    is essential that her guardian (wali) be present and give his consent. The 
    Prophet  (peace and blessings of Allaah be upon him) said: “There is no 
    marriage except with a guardian.” Narrated by al-Tirmidhi (1101); classed as 
    saheeh by al-Albaani in Irwa’ al-Ghaleel (1893). 

    And the Prophet  (peace and blessings of Allaah be upon 
    him) said: “Any woman who gets married without the permission of her 
    guardian, her marriage is invalid, her marriage is invalid, her marriage is 
    invalid.” Narrated by al-Tirmidhi (1102), classed as saheeh by al-Albaani in
    Irwa’ al-Ghaleel (1840). 

    Your saying that the marriage was done in accordance with the 
    madhhab of Abu Haneefah does not alter the ruling in the slightest, because 
    the opinion of anyone does not outweigh the words of the Messenger  
    (peace and blessings of Allaah be upon him), and the Messenger  (peace 
    and blessings of Allaah be upon him) ruled as you know, that a woman cannot 
    give herself in marriage and that the marriage of one who gave herself in 
    marriage is invalid. 

    Shaykh Ahmad Shaakir (may Allaah have mercy on him) said some 
    very important words about this matter: 

    What no one among the scholars doubts is that the hadeeth 
    “There is no marriage except with a guardian” is a saheeh hadeeth, which is 
    proven by means of an isnaad which almost reaches the level of mutawaatir. 
    This is the view of all the scholars, which is supported by the Qur’aan, and 
    no one disagreed with that –as far as we know – except the Hanafis and those 
    who followed them. The early ones among them may be excused, as it may be 
    that the hadeeth did not reach them at that time with a saheeh isnaad. As 
    for the later ones among them, they fell pray to sectarianism and tried hard 
    to prove the reports weak or misinterpret them without any proof. 

    And now we can see – in many of the Muslim lands which follow 
    the Hanafi madhhab with regard to this issue – the destructive effects of 
    this view on morals, manners and people’s honour, which means that most of 
    the marriages of women who got married without their guardians or in spite 
    of them, are invalid according to sharee’ah, which means that their children 
    are illegitimate.  

    I urge the Muslim scholars and leaders in every land and 
    region to re-examine this serious issue and return to that which was 
    enjoined by Allaah and His Messenger, which is the requirement of a wise 
    wali in the marriage, so that we will avoid many of the dangers to which 
    women are exposed, because of their ignorance and rashness, and their 
    pursuit of false freedoms, and their following their whims and desires, 
    especially the misled ones among them, the educated class, which fills our 
    hearts with sorrow and grief. May Allaah guide us to the laws of Islam and 
    grant us a good end. End quote. 

    Mukhtasar Tafseer Ibn Katheer 
    (1/286). 

    Based on this, the marriage that took place between you is 
    not valid, and the way to make it valid is to do a new marriage contract in 
    the presence of your wali and two witnesses. 

    We ask Allaah to set your affairs straight. 

    And Allaah knows best.