So the prayer is valid, but he is sinful for wearing it this way. This is the stronger opinion in this issue, because the prohibition here is not specific to the prayer.
Machine translationRead the Arabic original
The Shaykh : So the prayer is valid, but he is sinful for wearing it this way. This is the stronger opinion in this issue, because the prohibition here is not specific to the prayer; that is, wearing the forbidden garment is a general matter in prayer and other times, so it is not specific to the prayer and does not invalidate it. This is the rule adopted by the majority of scholars (may Allah have mercy on them), and it is the correct rule. If this hadith were authentic, it would settle the dispute, but it is weak. Because of its weakness, some said the prayer of the one who lets his garment hang is valid, and those who deemed it authentic said the prayer of the one who lets his garment hang is not valid. In any case, a person must fear Allah (Mighty and Majestic) and not take His blessing as a means to His anger, may Allah protect us from that. Indeed, whoever openly defies Allah, and is told that the garment hanging below the ankles is forbidden and among the major sins, but he does not care about this, then he has used Allah's blessing to commit disobedience to Allah. We ask Allah for well-being for us and for you.
