Ayesha reported,

A man came to the Prophet ﷺ seeking a ruling, while she was listening from behind the door. He said, "Messenger of Allah, the time for prayer comes upon me while I am in a state of major ritual impurity. Should I fast?"The Messenger of Allah ﷺ replied, "The time for prayer also comes upon me while I am in a state of major ritual impurity, and I fast."The man said, "You are not like us, Messenger of Allah. Allah has forgiven you your past and future sins."He said, "By Allah, I hope to be the most fearful of Allah among you and the most knowledgeable of you regarding what to guard against."

Muslim 2593

Sahih

حدثنا يحيى بن أيوب وقتيبة وابن حجر قال ابن أيوب حدثنا إسمعيل بن جعفر أخبرني عبد الله بن عبد الرحمن وهو ابن معمر بن حزم الأنصاري أبو طوالة أن أبا يونس مولى عائشة أخبره

عن عائشة رضي الله عنها

أن رجلا جاء إلى النبي ﷺ يستفتيه وهي تسمع من وراء الباب فقال يا رسول الله تدركني الصلاة وأنا جنب أفأصوم فقال رسول الله ﷺ وأنا تدركني الصلاة وأنا جنب فأصوم فقال لست مثلنا يا رسول الله قد غفر الله لك ما تقدم من ذنبك وما تأخر فقال والله إني لأرجو أن أكون أخشاكم لله وأعلمكم بما أتقي

مسلم 2593صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Fasting
Chapter
Validity of fasting for one upon whom Fajr rises while he is in a state of major ritual impurity
Numbering
Darussalam 2593
Muslim 2593