Sayyiduna Abu Hurayrah (may Allah be pleased with him) narrates that a man was praying with his waist-wrapper hanging below his ankles, and the Messenger of Allah (peace and blessings be upon him) said to him: "Go and perform ablution." The man went, performed ablution and came back, and he (peace and blessings be upon him) said: "Go and perform ablution." The man went, performed ablution again and came back. Then a man asked him (peace and blessings be upon him): "O Prophet of Allah! Why did you order him to perform ablution and then remain silent about him?" He (peace and blessings be upon him) said: "He was praying with his waist-wrapper hanging below his ankles, and Allah Almighty does not accept the prayer of one who prays with his waist-wrapper hanging down."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3304