“A righteous good dream that comes true is one of the forty-six parts of An-Nubuwwa.” Sahih al-Bukhari 6986

Arabic hadith text
حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يَحْيَى بْنِ أَبِي كَثِيرٍ ـ وَأَثْنَى عَلَيْهِ خَيْرًا لَقِيتُهُ بِالْيَمَامَةِ ـ عَنْ أَبِيهِ، حَدَّثَنَا أَبُو سَلَمَةَ، عَنْ أَبِي قَتَادَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏"‏الرُّؤْيَا الصَّالِحَةُ مِنَ اللَّهِ، وَالْحُلْمُ مِنَ الشَّيْطَانِ، فَإِذَا حَلَمَ فَلْيَتَعَوَّذْ مِنْهُ وَلْيَبْصُقْ عَنْ شِمَالِهِ، فَإِنَّهَا لاَ تَضُرُّهُ ‏"‏‏.‏ وَعَنْ أَبِيهِ حَدَّثَنَا عَبْدُ اللَّهِ بْنُ أَبِي قَتَادَةَ عَنْ أَبِيهِ عَنِ النَّبِيِّ صلى الله عليه وسلم مِثْلَهُ
Translation
Narrated Abu Qatada

The Prophet (ﷺ) said, "A good dream that comes true is from Allah, and a bad dream is from Satan, so if anyone of you sees a bad dream, he should seek refuge with Allah from Satan and should spit on the left, for the bad dream will not harm him."