The Messenger of Allah ﷺ said, "There are three matters in which seriousness is serious and jest is also serious: marriage, divorce, and taking back a wife after divorce."
أن رسول الله ﷺ قال: ثلاث جدهن جد، وهزلهن جد، النكاح، والطلاق، والرجعة.
Abu Dawud (2194), Tirmidhi (1184), Ibn Majah (2039), Ibn Jarud (712), Daraqutni (257/3), and Hakim (198/2) all narrated it, each through the hadith of Abdul-Rahman bin Habib bin Ardak Madani, from Ata, from Ibn Mahak, from Abu Hurairah, who related it.Hakim said, "The chain is sahih, and Abdul-Rahman bin Habib is among the trustworthy narrators of Madinah."Tirmidhi said, "This is a hasan gharib hadith, and the practice among scholars from among the companions of the Prophet ﷺ and others is in accordance with it." He also said, "Abdul-Rahman is Ibn Habib bin Ardak Madani, and Ibn Mahak, in my view, is Yusuf bin Mahak." End of quote.Ibn Hajar said in Talkhis (210/3), after quoting the statements of Tirmidhi and Hakim, "The author of Ilmam endorsed this, and it comes through the narration of Abdul-Rahman bin Habib bin Ardak, concerning whom there is disagreement. Nasai said, 'His hadith is rejected,' while others deemed him trustworthy. On this basis, it is hasan."On this subject there is also what was narrated from Ubada bin Samit, that the Messenger of Allah ﷺ said, "Joking is not permitted in three matters, divorce, marriage, and manumission. Whoever says them is bound by them."Harith bin Usama narrated it in his Musnad, Bughyat Bahith (305), from Bishr bin Umar, who said, Abdullah bin Lahia related to us, who said, Ubaydullah bin Abu Jafar related to us, from Ubada bin Samit, who related it.It has two flaws. The first is Abdullah bin Lahia, about whom there is well known criticism. The second is a break in the chain, as Ibn Hajar pointed out in Talkhis (209/3), meaning between Ubaydullah bin Abu Jafar and Ubada bin Samit.Something similar was also narrated from Abu Hurairah, from the Prophet ﷺ, "There are three matters in which there is no joking. Whoever speaks any of them in jest is bound by divorce, manumission, and marriage." Ibn Adi narrated it in Kamil (2033/6), and it contains Ghalib bin Ubaydullah, whom Ibn Main declared daif.Ibn Adi said, "Ghalib has other narrations besides what I have mentioned, and he has hadith with rejected content that I have not mentioned."On this subject there are other hadith with similar meaning, each strengthening the others, and taken together they indicate that it has a basis, which is further supported by reports from the companions.Among them is what has been reported from Ali and Umar, that they both said, "There are three matters in which there is no joking, marriage, divorce, and manumission." And in another report from them both, "four," adding "and vows." Abdul-Razzaq narrated it.This is what Tirmidhi was referring to when he said, "The practice among scholars from among the companions of the Prophet ﷺ and others is in accordance with this."Khattabi said, "The majority of scholars agree that if the explicit wording of divorce is uttered by an adult of sound mind, he is held accountable for it, and it does not benefit him to say, 'I was joking,' or 'I was jesting,' or 'I did not intend divorce by it,' or anything similar to that."He also said, "Some scholars have cited as evidence for this the words of Allah Almighty, "And do not take the verses of Allah in jest" [Baqarah 2:231], and said, if this were left open for people, the legal rulings would become void."