عَنْ اَبِي سَعِيدٍ الْخُدْرِيِّ، اَنَّهُ سَمِعَ رَسُولَ اللّٰهِ صلّى اللّٰهُ عَلَيْهِ وَسَلّمَ يَقُولُ: الرُّؤْيَا الصَّالِحَةُ جُزْءٌ مِنْ سِتَّةٍ وَاَرْبَعِينَ جُزْءًا مِنَ النُّبُوَّةِ.
It was narrated by Hazrat Abu Sa‘id al-Khudrira that he heard Allah’s Messengersa saying, “A pious dream constitutes one out of the forty six parts of prophethood.”
(Sahih al-Bukhari, Kitab at-ta‘bir)