Riyad as-Saliheen 1695
Anas (May Allah be pleased with him) said:
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].
وعن أنس رضي الله عنه أن رسول الله ﷺ قال:
"إن هذه المساجد لا تصلح لشيء من البول ولا القذر، إنما هي لذكر الله تعالى، وقراءة القرآن" أو كما قال رسول الله ﷺ . ((رواه مسلم)).
Classification
Sahih (Authentic)
References
Riyad as-Saliheen 1695
Riyad as-Saliheen Book of Prohibited actions, Hadith 185