the Messenger of Allah (ﷺ) forbade lashing for the legal punishment in the mosques.

Sunan Ibn Majah Book 20 Hadith 2698

Sunan Ibn Majah

The Chapters on Legal Punishments 20:2698

'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.

Grade: Da'if (Darussalam)