The Messenger of Allah ﷺ said, "Instruct the child to pray when he reaches seven years of age, and when he reaches ten, discipline him for neglecting it."
قال رسول الله ﷺ: مروا الصبي بالصلاة إذا بلغ سبع سنين، وإذا بلغ عشر سنين فاضربوه عليها.
Abu Dawud (494) and Tirmidhi (407) both narrated it through the route of Abdul-Malik bin Rabi bin Sabra, from his father, from his grandfather, and he related the hadith. Tirmidhi said, "Hasan sahih, and Sabra is Ibn Mabad Juhani, and it is also said he is Ibn Awsaja." Nawawi said in Majmu (103), "The hadith of Sabra is sahih, narrated by Abu Dawud and Tirmidhi and others with sahih chains. Tirmidhi said, 'Hasan.'" End of quote. This is how the statement "hasan" was quoted from Tirmidhi, but the copy we have says "hasan sahih."I say, the correct view is that the hadith is hasan, because of Abdul-Malik bin Rabi bin Sabra. Ajli deemed him reliable, while Ibn Main deemed him weak. Dhahabi said, "He is truthful, Allah willing."Ibn Khuzayma narrated it through his route in his Sahih (1002), as did Hakim (1/258), who said, "Sahih according to the criteria of Muslim." However, Muslim did not rely on him as a primary source, and only included one hadith from him in the chapter on mutah as a corroborating narration. Hakim does not distinguish between primary narrations and corroborating ones.