Is the prayer of one who forgot his intention while performing it, then reminded himself of another prayer and corrected it, valid?
It is not obligatory to keep the specific act of prayer in mind throughout the entire prayer. Rather, it is obligatory to maintain the effect of the intention by not intending to discontinue it. So, if the intention for the specific prayer slips from your mind during it, that does not harm it. And if you make a mistake in the specification during the prayer, such as thinking you are praying Asr when it is Dhuhr, your prayer is valid.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/194154