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.
The person in the state of Ihraam is not allowed to wear trousers unless he could not find a garment, as authentically narrated on the authority of Ibn ‘Abbaas . If you were ignorant of that ruling, there would be no expiation on you and no sin. Allaah The Almighty Says (what means): {And there is no blame upon you for that in which you have erred but [only for] what your hearts intended. And ever Is Allaah Forgiving and Merciful.} [Quran 33:5]
Your marriage contract is certainly valid as long as you concluded it when you were out of the state of Ihraam. That is because the pilgrim in the state of Ihraam is the one who is prevented from concluding the marriage contract, as authentically narrated on the authority of ‘Uthmaan [Al-Bukhari and Muslim].
Allaah Knows best.