It was narrated that Jasrah said:
"Umm Salamah told me: 'The Messenger of Allah entered the courtyard of this mosque and called out at the top of his voice: 'The mosque is not permissible for anyone who is sexually impure or any woman who is menstruating.''"
English reference: Vol. 1, Book 1, Hadith 645
Arabic reference: Book 1, Hadith 688
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.