Shaykh al-Islam Ibn Taymiyyah (may Allah have mercy on him) said:
It is obligatory to teach Muslim children what Allah has commanded to teach them, and to bring them up on the obedience of Allah and His Messenger, as the Prophet (peace be upon him) said, “Command them to pray when they become seven, and beat them to perform it (prayer) when they become ten; and separate them in their beds.”
[Majmu` al-Fatawa (11/504)]
الواجب في تعليم أولاد المسلمين