Narrated Abu Hurairah:"A man enter the Masjid and performed Salat while the Messenger of Allah (ﷺ) was sitting at the back of the Masjid. Then he came to greet him, so the Prophet (ﷺ) said: "Wa Alaikum (and upon you); go back and pray for indeed you have not prayed.'" And he mentioned the Hadith in its entirety
Hadith No. 2692
Jami At Tirmidhi
Gradings:
Ahmad Muhammad Shakir:
Sahih
Al-Albani:
Sahih
Zubair Ali Zai:
Sahih - Bukhari And Muslim