All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
There are some unclear points in your question, so this prevents us from issuing a ruling as to whether or not this marriage is valid. We advise you to orally ask some trustworthy scholars in your country or to consult an Islamic court.
Nonetheless, we will remind you of some general matters:
Firstly, OCD does not prevent a person from being accountable unless he reaches the state of a insane person who is not aware of his actions. If he does not reach this state, then his actions are valid and their consequences are taken into account.
Secondly, the scholars stated the conditions for the validity of marriage, and we clarified them in fatwa 83629. The presence of the bride's guardian (Wali) is a condition for the validity of marriage according to most scholars, contrary to the view of Abu Haneefah. The guardian knowing about the marriage is not enough; rather, his presence or the presence of his representative in the contract is a must.
Thirdly, concerning the witnesses, all those who attended the contract – who are eligible for being a witness – their testimony is valid regardless of whether it is this young man or anyone else, and it is not a condition that they sign the contract or attend the supplication. As regards your testimony, if you are not one of the parties to the contract, meaning if you are neither a guardian for the bride nor a representative of the husband, then your testimony is accepted. But the testimony of women in marriage is not accepted according to the view of most scholars; whereas the Hanafi School considers that their testimony is valid.
Finally, we advise you to strive to get rid of these OCD whispers by seeking refuge with Allah from the accursed Satan, observing the Athkaar (expressions of remembrance of Allah) and performing Ruqyah (healing through Quranic recitation and supplication).
For more benefit, please refer to fatwas 88660 and 82918.
If it becomes clear to you that the marriage is valid, then do not pay any attention to any whispers about it; rather, you should repel them as they are from the devil, who wants to spoil your life.
Allah knows best.