Abu Bakra reported,

The Prophet ﷺ said, "None of you should say, 'I fasted the entirety of Ramadan and stood the entirety of it in prayer.'"I do not know whether he disliked it because of self-praise, or whether he said, "There must be some sleep or rest."

Azami 4312

Hasan

عن أبي بكرة

عن النبي ﷺ قال: لا يقولن أحدكم: إني صمت رمضان كله وقمته كله فلا أدري أكره التزكية، أو قال: لا بد من نومة أو رقدة.

الأعظمي 4312حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Fasting
Chapter
Obligation of fasting, its virtue, and its rulings
Section
Prohibition of a person saying "I fasted all of Ramadan" and "I prayed all of Ramadan"
Numbering
Jami al-Kamil 4312 (2nd edition)
Azami 4312