Ayesha reported,

A man said to the Messenger of Allah ﷺ while he was standing at the door, and I was listening, "Messenger of Allah, I sometimes wake up in the morning in a state of major ritual impurity while intending to fast."The Messenger of Allah ﷺ replied, "I too wake up in the morning in a state of major ritual impurity while intending to fast. I then perform the ritual bath and complete my fast."The man said, "Messenger of Allah, you are not like us. Allah has forgiven you your past and future sins."The Messenger of Allah ﷺ became angry and said, "I truly hope to be the one among you who fears Allah the most, and the most knowledgeable of you regarding what to guard against."

Azami 4571

Sahih

عن عائشة

أن رجلا قال لرسول الله ﷺ، وهو واقف على الباب، وأنا أسمع: يا رسول الله، إني أصبح جنبا وأنا أريد الصيام. فقال ﷺ: وأنا أصبح جنبا وأنا أريد الصيام، فأغتسل وأصوم. فقال له الرجل: يا رسول الله، إنك لست مثلنا، قد غفر الله لك ما تقدم من ذنبك وما تأخر. فغضب رسول الله ﷺ وقال: إني لأرجو أن أكون أخشاكم الله، وأعلمكم بما أتقي.

الأعظمي 4571صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Fasting
Chapter
What is permitted and what is not permitted for the fasting person
Section
Validity of fasting for one who reaches dawn while in a state of janabah
Numbering
Jami al-Kamil 4571 (2nd edition)
Azami 4571