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.
Muslim jurists stated that witnesses are required as a condition for the marriage contract to be valid, however, bearing witness to the bride’s consent to marriage is not a condition, rather, it is recommended. The Shaafi‘i scholars Imaam Qalyoobi and ‘Umayrah said, “It is recommended to have witnesses to the bride’s consent to marriage, she may say: ‘I accept him as a husband,’ or approve that marriage or any expression of consent that reflects her satisfaction, so as to shun the potential that she might be compelled to marry him. However, it is not among the conditions of a valid marriage in Islam.”
Hence, it is obvious that bearing witness to a marriage contract means witnessing the consent of both parties to the marriage.
Allaah Knows best.