Purification from the major and minor ritual impurity is a condition for the validity of the prayer
It is narrated from Abu Hurairah (may Allah be pleased with him) that the Messenger of Allah ﷺ said:
ولا يقبل الله صلاة أحدكم إذا أحدث حتى يتوضا
“Allah the Exalted does not accept the prayer of any of you when he breaks his wudu’, until he performs wudu’.”
It is narrated from Abu Hurairah (may Allah be pleased with him) that a Bedouin stood in the mosque and began to urinate. The people stood up to stop him, so the Prophet ﷺ said:
دعوه وأريقوا على بوله سجلا من ماء فإنما بعثتم ميسرين ولم تبعثوا معسرين
“Leave him, and pour a bucket of water over his urine, for you have been sent to make things easy, and you have not been sent to make things difficult.”
According to the majority of scholars, these three acts are obligatory for the prayer, and a group also claims that it is a condition for the validity of the prayer, while others call it recommended (sunnah), but the correct view is that it is obligatory.
The definition of the obligatory (wajib): هو الفعل الذى طلب الشارع طلبا جازما بحيث يثاب فاعله و يعاقب تاركه
“An act that the Lawgiver (peace be upon him) has requested in a binding manner, such that the one who does it is rewarded and the one who leaves it is punished (for example, prayer, fasting, etc.).”
The summary of the matter is that the three acts mentioned (that is, the purity of the clothing, the body and the place) are obligatory, not conditions, meaning that if someone leaves any one of them, his prayer will still be valid, but he will certainly be sinful for leaving an obligation. However, if these were conditions, then leaving any one of them would necessarily mean that the prayer would not be valid, whereas this is not the case.
And he should cover his private parts (satr)
➊ Allah the Exalted says:
يبنى آدَمَ خُذُوا زِيْنَتَكُمْ عِندَ كُلِّ مَسْجِدٍ
“O children of Adam! Take your adornment (that is, your clothing) at every place of prostration (every time you present yourselves at the mosque).”
(Ibn Kathir, may Allah have mercy on him) Here, adornment means clothing that covers the private parts.
(Al-Qurtubi, may Allah have mercy on him) This verse indicates the obligation of covering the private parts.
(The majority) Covering the private parts is one of the obligatory acts (fara’id) of the prayer.
Some people hold the view that covering the private parts is a condition for the prayer.
(Al-Shawkani, may Allah have mercy on him) The correct view is that covering the private parts is only obligatory for the prayer.
➋ It is narrated from Bahz ibn Hakim, from his father, from his grandfather (may Allah be pleased with him), that the Messenger of Allah ﷺ said:
احـفـظ عورتك إلا من زوجتك أو ما ملكت يمينك
“Guard your private parts from everyone except your wife and your slave woman.”
The narrator says: I said, “What if one of us is alone (may he uncover his private parts)?” He ﷺ said:
فالله أحق أن يستحبى منه
“Allah the Exalted is more deserving that one be shy before Him.”
Covering the private parts is obligatory at all times, except at the time of relieving oneself, intimacy with one’s wife, and bathing; and it is obligatory in front of all people, except the wife and the slave woman, and (when necessary) except for a physician and the like.