If the Messenger of Allah ﷺ had seen what the women have introduced, he would have barred them from the mosque, just as the women of the Children of Israil were barred.Yahya said, I asked Amra, "Were the women of the Children of Israil barred?"She replied, "Yes."
حدثنا القعنبي عن مالك عن يحيى بن سعيد عن عمرة بنت عبد الرحمن أنها أخبرته أن
لو أدرك رسول الله ﷺ ما أحدث النساء لمنعهن المسجد كما منعه نساء بني إسرائيل قال يحيى فقلت لعمرة أمنعه نساء بني إسرائيل قالت نعم
Bukhari transmitted it in the Book of Adhan, chapter on the people waiting for the learned imam to stand up, hadith no. 869, from the hadith of Malik through him, and it is in the Muwatta (Yahya: 1/198, and Qanabi p. 115, 116). Muslim also transmitted it in the Book of Prayer, chapter on women going out to the mosques etc., hadith no. 445, from the hadith of Yahya bin Saeed Ansari through him.