Muwatta Imam Malik Book of Purity, Hadith 87
Yahya related to me from Malik from Hisham ibn Urwa from his father from Zaynab bint Abi Salama that Umm Salama, the wife of the Prophet ﷺ said, "Umm Salama, the wife of Abu Talha al-Ansari, came to the Messenger of Allah ﷺ and said, 'Messenger of Allah! Allah is not ashamed of the truth-does a woman have to do ghusl if she has had an erotic dream?' He said, 'Yes, if she sees any liquid.' "
حَدَّثَنِي عَنْ مَالِكٍ، عَنْ هِشَامِ بْنِ عُرْوَةَ، عَنْ أَبِيهِ، عَنْ زَيْنَبَ بِنْتِ أَبِي سَلَمَةَ، عَنْ أُمِّ سَلَمَةَ، زَوْجِ النَّبِيِّ ﷺ أَنَّهَا قَالَتْ جَاءَتْ أُمُّ سُلَيْمٍ امْرَأَةُ أَبِي طَلْحَةَ الأَنْصَارِيِّ إِلَى رَسُولِ اللَّهِ ﷺ فَقَالَتْ يَا رَسُولَ اللَّهِ إِنَّ اللَّهَ لاَ يَسْتَحْيِي مِنَ الْحَقِّ هَلْ عَلَى الْمَرْأَةِ مِنْ غُسْلٍ إِذَا هِيَ احْتَلَمَتْ فَقَالَ " نَعَمْ إِذَا رَأَتِ الْمَاءَ " .