Fiqh-us-Sunnah Volume 2, Supererogatory Prayer, Fiqh 2.097.

Section : Intentionally leaving out an essential act or condition of the prayer without any valid excuse for doing so.

Al-Bukhari and Muslim record that the Prophet sallallahu alehi wasallam told a bedouin who had not performed his salah well: “Return and pray for you have not prayed.” (This hadith was mentioned earlier.)

Ibn Rushd writes: “There is an agreement that if one prays and he is not in a state of purity, it is obligatory for him to repeat the prayer, [that is true if the act was done] intentionally or out of forgetfulness. Similarly, one who prays without facing the qiblah, intentionally or due to forgetfulness, [must repeat the salah]. In general, if any of the conditions for the correctness of the salah are absent, it becomes obligatory to repeat the salah. “