عَنِ ابْنِ عُمَرَ رَضِيَ اللَّهُ عَنْهُمَا أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قَالَ الرُّؤْيَا الصَّالِحَةُ جُزْءٌ مِنْ سَبْعِينَ جُزْءًا مِنَ النُّبُوَّةِ فَمَنْ رَأَى خَيْرًا فَلْيَحْمَدِ اللَّهَ عَلَيْهِ وَلْيَذْكُرْهُ وَمَنْ رَأَى غَيْرَ ذَلِكَ فَلْيَسْتَعِذْ بِاللَّهِ مِنْ شَرِّ رُؤْيَاهُ وَلَا يَذْكُرْهَا فَإِنَّهَا لَا تَضُرُّهُ
Sayyiduna Ibn Umar (may Allah be pleased with them both) narrates that the Noble Prophet (peace and blessings be upon him) said: A good dream is one of the seventy parts of prophethood. Whoever sees something good in a dream should praise Allah for it and mention it. And whoever sees a dream other than a good one should seek Allah’s protection from its evil and should not mention it to anyone; thus, it will not harm him.