Wa `alaykum As-Salamu waRahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
Elaborating more on this, the late Sheikh Ibn `Uthaymeen, a prominent Saudi Muslim scholar, (may Allah shower mercy on his soul), stated:
The ruling regarding their prayer is the same regarding the one who prays in shorts without the thobe, because transparent clothes that describe the body are not sufficient and wearing them is equivalent to not wearing them.
Based upon this, their prayer is not valid according to the most correct opinion of the scholars, and it is the well-known opinion of Imam Ahmad.
This is because it is obligatory for men to cover what is between the navel and the knees during the prayer. And this is the lowest form by which compliance to the saying of Allah, the Mighty and Majestic, occurs, “O Children of Adam take your adornment while praying…” (Al-A`raf 7:31)
So one of two matters is obligatory upon them: either they should wear shorts which cover that which is between the navel and the knees, or they should wear a non-transparent clothes which does not reveal the body.
This action which the questioner has mentioned is a mistake and very dangerous, so it is upon them to repent to Allah, the Most High, and to be enthusiastic in striving to completely cover themselves in the prayer.
Almighty Allah knows best.