He was a veteran of Badr. He said, "We were with the Messenger of Allah ﷺ when a man entered the mosque and prayed. The Messenger of Allah ﷺ was watching him without the man being aware. When he finished, he came to the Messenger of Allah ﷺ and greeted him. returned the greeting and then said, 'Go back and pray, for you have not prayed.'"He said, "I am not sure whether it was the second or the third time when the man said, 'By the One who revealed the Book to you, I have exerted myself to my utmost. So teach me and show me.'"He said, "When you intend to pray, perform the ablution well. Then stand and face the qiblah. Then say the takbir, then recite, then bow until you are settled in bowing, then rise until you are standing upright, then prostrate until you are settled in prostration, then raise your head until you are settled in sitting, then prostrate until you are settled in prostration. When you have done that, you have completed your prayer. Whatever you fall short of in this, you have only diminished from your prayer."
أخبرنا قتيبة قال حدثنا بكر بن مضر عن ابن عجلان عن علي بن يحيى الزرقي عن أبيه
وكان بدريا قال كنا مع رسول الله ﷺ إذ دخل رجل المسجد فصلى ورسول الله ﷺ يرمقه ولا يشعر ثم انصرف فأتى رسول الله ﷺ فسلم عليه فرد عليه السلام ثم قال ارجع فصل فإنك لم تصل قال لا أدري في الثانية أو في الثالثة قال والذي أنزل عليك الكتاب لقد جهدت فعلمني وأرني قال إذا أردت الصلاة فتوضأ فأحسن الوضوء ثم قم فاستقبل القبلة ثم كبر ثم اقرأ ثم اركع حتى تطمئن راكعا ثم ارفع حتى تعتدل قائما ثم اسجد حتى تطمئن ساجدا ثم ارفع رأسك حتى تطمئن قاعدا ثم اسجد حتى تطمئن ساجدا فإذا صنعت ذلك فقد قضيت صلاتك وما انتقصت من ذلك فإنما تنقصه من صلاتك
[Sahih] Reported by Abu Dawud, Prayer, chapter on the prayer of one who does not straighten his back in ruku and sujud, no. 858, and Ibn Majah, Purification, chapter on what has been said about the wudu as Allah Almighty commanded, no. 460, from the hadith of Ali bin Yahya, in this wording. It is also found in Kubra, no. 640, and Hakim graded it sahih according to the criteria of the two Shaykhs (1/241, 242), and Dhahabi agreed with him.Tirmidhi also reported it, no. 302, from the hadith of Yahya from his grandfather, in this wording, and said, "hasan hadith."