Hadithcore
Mishkat al-Masabih, 3286

Abu Huraira reported God’s Messenger as saying, “Every divorce is allowable except that by an idiot or one whose mind is deranged.” Tirmidhi transmitted it, saying this is a <i>gharib</i> tradition, and ‘Ata’ b. ‘Ajlan, the transmitter, is a weak authority whose traditions are rejected.

وَعَنْ أَبِي هُرَيْرَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «كُلُّ طَلَاقٍ جَائِزٌ إِلَّا طَلَاقَ الْمَعْتُوهِ وَالْمَغْلُوبِ عَلَى عَقْلِهِ» . رَوَاهُ التِّرْمِذِيُّ وَقَالَ: هَذَا حَدِيثٌ غَرِيبٌ وَعَطَاءُ بْنُ عجلانَ الرَّاوي ضعيفٌ ذاهبُ الحَدِيث

References1 variant
In-Book Reference
Book 13, Hadith 202