While a man was praying with his lower garment hanging down below his ankles, the Messenger of Allah ﷺ said to him, "Go and perform ablution."So he went and performed ablution, then returned.The Prophet ﷺ said again, "Go and perform ablution."He went, performed ablution, and came back.A man then asked, "Messenger of Allah, why did you order him to perform ablution and then remain silent about it?"He replied, "He was praying with his lower garment hanging below his ankles, and Allah the Exalted does not accept the prayer of a man whose garment hangs below his ankles."
حدثنا موسى بن إسمعيل حدثنا أبان حدثنا يحيى عن أبي جعفر عن عطاء بن يسار
بينما رجل يصلي مسبلا إزاره إذ قال له رسول الله ﷺ اذهب فتوضأ فذهب فتوضأ ثم جاء ثم قال اذهب فتوضأ فذهب فتوضأ ثم جاء فقال له رجل يا رسول الله ما لك أمرته أن يتوضأ ثم سكت عنه فقال إنه كان يصلي وهو مسبل إزاره وإن الله تعالى لا يقبل صلاة رجل مسبل إزاره
[Its chain is hasan] Ahmad reported it, 4/67, from the hadith of Abu Aban Attar through this route. Abu Jafar Madani was graded hasan by Tirmidhi, hadith 3448, and graded sahih by Ibn Hibban, hadith 2406. Ibn Hajar strengthened him in Takhrij Adhkar, and Nawawi in Riyadh Saliheen by declaring his hadith sahih. Yahya bin Abu Kathir narrated from him, and he would not narrate except from a trustworthy narrator, as stated by Abu Hatim Razi. So no weight should be given to those who considered him unknown. And Allah knows best.