It is reported on the authority of Abu Huraira that the Messenger of Allah (ﷺ) made observations like them embodied in the hadith narrated by Yahya b. Muhammad on the authority of 'Ala', and added to it:
even if he observed fast and prayed and asserted that he was a Muslim.
Reference: Sahih Muslim 59 d In-book : Book 1, Hadith 120 USC-MSA web (English) : Book 1, Hadith 115 (deprecated)
Help us gift a modern, ad-free Islamic application for the Muslim Ummah. Your donation will be recorded as Sadaqah Jariyah in your book of deeds, In Sha Allah.