The Chapter of the Qibla
Man Lā Yaḥḍuruh al-Faqīh|Volume 1|Book 1|Chapter 43
وَ رُوِيَ عَنْ عَبْدِ اَلرَّحْمَنِ بْنِ أَبِي عَبْدِ اَللَّهِ: أَنَّهُ سَأَلَ اَلصَّادِقَ عَلَيْهِ اَلسَّلاَمُ عَنْ رَجُلٍ أَعْمَى صَلَّى عَلَى غَيْرِ اَلْقِبْلَةِ فَقَالَ «إِنْ كَانَ فِي وَقْتٍ فَلْيُعِدْ وَ إِنْ كَانَ قَدْ مَضَى اَلْوَقْتُ فَلاَ يُعِيدُ» قَالَ وَ سَأَلْتُهُ عَنْ رَجُلٍ صَلَّى وَ هِيَ مُتَغَيِّمَةٌ ثُمَّ تَجَلَّتْ فَعَلِمَ أَنَّهُ صَلَّى عَلَى غَيْرِ اَلْقِبْلَةِ فَقَالَ «إِنْ كَانَ فِي وَقْتٍ فَلْيُعِدْ وَ إِنْ كَانَ اَلْوَقْتُ قَدْ مَضَى فَلاَ يُعِيدُ.
It was narrated from Abdul Rahman ibn Abi Abdullah that he asked Imam Jafar ibn Muhammad Al-Sadiq عليه السلام about a blind man who prayed facing a direction other than the Qiblah. Imam عليه السلام replied: "If it is still within the prayer time, he should repeat the prayer. If the time has passed, he does not need to repeat it." He further asked about a man who prayed during cloudy weather and afterward, when the clouds cleared, realized he had prayed in the wrong direction. The Imam said: "If it is still within the prayer time, he should repeat the prayer. If the time has passed, he does not need to repeat it”.
- Ṣaḥīḥ al-Faqīh