Riyad as-Salihin #1695 · The Book of the Prohibited actions

Riyad as-SalihinAnas ibn Malik
Riyad as-Salihin · Book 18 · The Book of the Prohibited actions
Riyad as-Salihin · كتاب 18 · كتاب الأمور المنهي عنها
The Messenger of Allah (صلى الله عليه وسلم) said, "It is not proper to use the mosque for urinating or easing oneself. They are merely built for the remembrance of Allah and the recitation of the Qur'an", or as he stated. [Muslim] .
وعن أنس رضي الله عنه أن رسول الله صلى الله عليه وسلم قال:
"إن هذه المساجد لا تصلح لشيء من البول ولا القذر، إنما هي لذكر الله تعالى، وقراءة القرآن" أو كما قال رسول الله صلى الله عليه وسلم . ((رواه مسلم)).
Reference : Riyad as-Salihin 1695In-book reference : Book 18, Hadith 185