The Messenger of Allah ﷺ said, "There are three matters in which seriousness is serious and jest is also serious: marriage, divorce, and the revocation of divorce."
حدثنا قتيبة حدثنا حاتم بن إسمعيل عن عبد الرحمن بن أردك المدني عن عطاء عن ابن ماهك
قال رسول الله ﷺ ثلاث جدهن جد وهزلهن جد النكاح والطلاق والرجعة
[Its isnad is hasan]. Ibn Majah also narrated it, in the Book of Divorce, chapter on someone who divorces, or marries, or takes back his wife in jest, hadith 2039, from the hadith of Hatim, and Abu Dawud, hadith 2194, from the hadith of Abdul-Rahman bin Ardak, through him, and Hakim graded it sahih, 2/198, as did others.