وَعَنْ عَلِيٍّ رَضِيَ اللَّهُ عَنْهُ
قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «رُفِعَ الْقَلَمُ عَنْ ثَلَاثَةٍ: عَنِ النَّائِمِ حَتَّى يَسْتَيْقِظَ وَعَنِ الصَّبِيِّ حَتَّى يَبْلُغَ وَعَنِ الْمَعْتُوهِ حَتَّى يعقل»
a sleeper till he awakes, a boy till he reaches puberty, and an idiot till he is restored to reason. Tirmidhi and Abu Dawud transmitted it. Darimi transmitted it on the authority of Aishah, and Ibn Majah on the authority of both (i.e. Ali and Aishah