The Funeral Prayer (Salat Al-Janazah)
Man Lā Yaḥḍuruh al-Faqīh|Volume 1|Book 1|Chapter 26
وَ رَوَى زُرَارَةُ وَ عُبَيْدُ اَللَّهِ بْنُ عَلِيٍّ اَلْحَلَبِيُّ عَنْ أَبِي عَبْدِ اَللَّهِ عَلَيْهِ اَلسَّلاَمُ: أَنَّهُ سُئِلَ عَنِ اَلصَّلاَةِ عَلَى اَلصَّبِيِّ مَتَى يُصَلَّى عَلَيْهِ فَقَالَ «إِذَا عَقَلَ اَلصَّلاَةَ» فَقُلْتُ مَتَى تَجِبُ اَلصَّلاَةُ عَلَيْهِ قَالَ «إِذَا كَانَ اِبْنَ سِتِّ سِنِينَ وَ اَلصِّيَامُ إِذَا أَطَاقَهُ.
Zurarah and Ubaidullah ibn Ali Al-Halabi narrated from Imam Jafar ibn Muhammad Al-Sadiq عليه السلام that He was asked about when the funeral prayer should be offered for a child. Imam عليه السلام replied: "When the child understands the concept of prayer." I asked: "At what age does prayer become obligatory for the child?" Imam عليه السلام replied: "When the child reaches six years old, and fasting becomes obligatory when they are capable of it."
- Ṣaḥīḥ al-Faqīh, p. 31