Praise be to Allaah.
It was reported in a hadeeth narrated by Abu Dawood that Abu Hurayrah said: “Whilst a man was praying with his izaar (lower garment) hanging below his ankles, the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Go and do wudoo’.”… He said, “He was praying with his izaar hanging below his ankles, and Allaah does not accept the prayer of a man who lets his izaar hang below his ankles. (Narrated by Abu Dawood, al-Salaah, 543. This was classed as da’eef (weak) by al-Albaani in Da’eef Sunan Abi Dawood, no. 124).
With regard to the validity of prayer, Shaykh Ibn ‘Uthaymeen was asked about that and he said: If the garment is hanging down below the ankles, then it is haraam, because the Prophet (peace and blessings of Allaah be upon him) said, “Whatever part of the izaar (lower garment) is hanging down below the ankles is in the Fire.” What the Prophet (peace and blessings of Allaah be upon him) said concerning the izaar also applies to other types of clothing.
Based on this, a person has to lift his thobe (galabiyah) or other garments to be above his ankles. If he prays in it when it is below his ankles, then there is a difference of opinion among the scholars as to whether his prayer is valid.
Some of them think that his prayer is valid, because this man has done what is obligatory, i.e., covering his ‘awrah.
Some of them think that his prayer is not valid, because he has covered his ‘awrah with a haraam garment. They say that one of the conditions of covering the ‘awrah is that the garment worn should be permissible. So a man is in danger if he prays in a garment that comes down below his ankles; he should fear Allaah and raise his garment so that it will be above his ankles.
Fataawa Ibn ‘Uthaymeen, part 12, p. 306