Sunan Ibn Majah, Volume 3, Book 20, Hadith 2600 (DarusSalam) ⓘ
'Amr bin Shu'aib narrated from his father, from his grandfather, that: the Messenger of Allah forbade lashing for the legal punishment in the mosques.
حَدَّثَنَا مُحَمَّدُ بْنُ رُمْحٍ، أَنْبَأَنَا عَبْدُ اللَّهِ بْنُ لَهِيعَةَ، عَنْ مُحَمَّدِ بْنِ عَجْلاَنَ، أَنَّهُ سَمِعَ عَمْرَو بْنَ شُعَيْبٍ، يُحَدِّثُ عَنْ أَبِيهِ، عَنْ جَدِّهِ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم نَهَى عَنْ جَلْدِ الْحَدِّ فِي الْمَسْجِدِ .
also referenced under: Hadith 2600 (Reference) & Book 20, Hadith 2698 (In-Book)