Ash Shaykh Yahya Al Hajooree said:
As for specifying the Masaajid for the marriage contract, then this is an innovation. It was not a practice at the time of the prophet صلى الله عليه و سلم that they would do the contracts in the Masaajid. Yes, if by chance it occurs for the person in the Masjid, then he can do the contract in it, it isn’t Haraam. But making it a must that it be in a Masjid hoping in the blessing of the Masjid is an innovation, and every innovation is misguidance.
The prophet صلى الله عليه و سلم married off his daughter.
Similarly, he married off the woman whom that man said to him [regarding her] “If you have no need for her then marry her to me”.
In his time, many men got married, and it hasn’t been relayed that they would intend the marriage contract in the Masjid and the prophet صلى الله عليه و سلم said
He who innovates In this matter of ours that which isn’t from it will have it rejected
As for them attending, then we don’t advise witnessing falsehood if it is a regular custom of those people, that they don’t do the marriage contract except in the Masjid. Don’t go there and do the contract for them, and don’t attend that sitting except with the intention to advise them in regards to it.
[Kinzuthameen volume 4]
Also Imam Al Uthaymeen was asked:
Shaykh ul Islaam and Ibnul Qaiyum mentioned that doing the marriage contract in the masjid is recommended whilst we heard you say it’s an innovation. So what is your opinion?
I have not ceased to be upon my opinion. Did shaykhul Islam mention a proof for his statement?
The questioner said: No
The shaykh replied: Thus it is an innovation.
[Kinzuthameen fi Su’alaat Ibn Sunayd Libnil Uthaymeen Question 587]
He also said:
[As for the matter of] recommending doing the marriage contract in the Masjid, I don’t know of any origin for it nor proof from the prophet صلى الله عليه و سلم but if by chance the [future] husband and guardian are present in the Masjid and they did the contract, then no problem.
[Liqaa babul Maftuh 17/167]
When asked about a potential evidence for it by way of the statement:
“But they said: the most beloved places to Allah are the Masaajid”
This is the house of Allah and it is befitting that the marriage contract be in it, but there isn’t a specific sunnah where the prophet صلى الله عليه و سلم would go to the masjid and do the marriage contract there. Therefore, it isn’t befitting that it be said it is recommended.
[Liqaa babul Maftuh 17/167]
If it is said that there is a narration in Sunan At Tirmithi that permits it:
The narration is Aisha The Messenger of Allah صلى الله عليه و سلم said: “Publicize this marriage, and hold it in the Masjid, and beat the duff for it.
Then we reply:
Lajnah Daimah said:
As for doing the marriage contract in the Masjid, then it isn’t Sunnah, and the aforementioned narration isn’t a proof. Rrather, it is weak due to the weakness of Eisa Ibn Maymoon Al Ansaari and Khaalid Ibn Ilyaas.
[volume 18/112-113 of their Majmoo Fatawa]
Also Imam Albani declared it weak
But he also mentioned its meaning isn’t correct. He rahimahullah said:
Increase upon that, that the narration is rejected by way of its meaning, for its meaning in the context of the narration is that beating of the Daff is permissible in the Masaajid to announce [the marriage] and that isn’t permissible without any differing which I am aware of
Source [نقد نصوص حديثية في الثقافة العامة. Page 21]
Ash-Shaykh Bin Baaz rahimahullah was asked the following question:
We hear from some of the people whom do their marriage contract in the Masjid Al Haraam, they say that it is a blessed place and we hope that the marriage be as such and successful if Allah wills. Thus, what is the legislative ruling in regards to that oh Shaykh?
I don’t know of any proof in regards to this, wherever the contract is done, no problem, In the Masjid, in the house, or in any place, no problem. I don’t know any clear proof for it being special in the Masjid, or I don’t recall a clear proof of having it in the Masjid, the marriage contract.
Majid Jawed Al-Afghanee