Moreover, these ḥadīths—as well as the Qur’anic verse—prove that covering the ʿawrah is obligatory both in ṣalāh and outside it.
As for the obligation to cover it outside the prayer, that is unanimously acknowledged. Ibn Rushd records this consensus in al-Bidāyah, and al-Nawawī does the same in al-Majmūʿ.
Regarding its obligation within the prayer, scholars differ. The majority deem it compulsory; this is the position of Abū Ḥanīfah, al-Shāfiʿī, Dāwūd, and Ibn Ḥazm. Ibn Rushd says in al-Bidāyah: “The apparent view of Mālik is that it is among the sunnahs of the prayer.”
Ismāʿīl al-Qāḍī adopted the same opinion, as cited in Tafsīr al-Qurṭubī, yet this view is weak, for the explicit commands to cover the ʿawrah clearly apply—and the prescribed prayer is even more deserving of that, as is obvious.
From what has been stated, it becomes clear that Ibn Ḥazm’s remark in Marātib al-Ijmāʿ—“They are unanimously agreed that covering the ʿawrah in prayer, for anyone able to wear a lawful garment, is obligatory”—is not an accurate transmission of consensus.
Those who consider it obligatory in prayer further treat it as a condition for the prayer’s validity; hence, anyone who prays while naked, in their view, has an invalid prayer. Al-Nawawī writes: “Some of Mālik’s disciples said: Covering the ʿawrah is obligatory but not a condition; therefore, if one prays with it exposed, his prayer is valid whether he did so deliberately or out of forgetfulness.”