The Prophet ﷺ saw a man praying alone behind the row and ordered him to repeat the prayer.
حدثنا يحيى بن سعيد عن شعبة حدثنا عمرو بن مرة عن هلال بن يساف عن عمرو بن راشد
أن النبي ﷺ رأى رجلا يصلي في الصف وحده فأمره أن يعيد الصلاة
Its chain of transmission is sahih.