Is Divorce in Jest Valid?
Question

If a man says to his wife, “You are divorced,” but he did not intend it as a divorce, rather he was joking with her, does that count as a divorce?
Praise be to Allah.Does Divorce in Jest Count?
The scholars differed as to whether a divorce given in jest counts as a divorce. The majority are of the view that it does count as such, and they quoted as evidence the report narrated by Abu Hurayrah (may Allah be pleased with him) who said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “There are three matters in which seriousness is serious and joking is serious: marriage, divorce and taking back (one’s wife).” (Narrated by Abu Dawud, 2194; At-Tirmidhi, 1184; Ibn Majah, 2039)
The scholars differed as to whether this report is sound or inauthentic. Al-Albani classed it as sound in Irwa’ Al-Ghalil (1826)
Companions’ Perspective on Joking in Divorce, Marriage, and Manumission
A similar meaning was narrated in Mawquf reports from some of the Companions.

It was narrated that `Umar ibn Al-Khattab (may Allah be pleased with him) said: “There are four things which become binding if they are spoken: divorce, manumission, marriage and vows.”
It was narrated from `Ali (may Allah be pleased with him): “There are three in which jesting is like seriousness: divorce, marriage and manumission.”
Abu Ad-Darda’ said: “There are three matters in which jesting is just as valid as saying them seriously: divorce, marriage and manumission.”

Ibn Al-Qayyim’s Classification of Intent in Divorce Statements
Ibn Al-Qayyim (may Allah have mercy on him) said, after mentioning the Hadith quoted above:
These Sunnahs imply that one who is accountable jokes about divorce , marriage or taking back his wife, then what he joked about becomes binding on him. This indicates that the words of a joker carry weight even though the words of a sleeper, one who forgets, one who has lost his mind and one who is forced do not count. The difference between them is that the joker intends to say the words although he does not want the ruling on his words to apply, but it is not up to him. Rather, uttering these words is up to him, but as for the ruling on those words, that is up to the Lawgiver, whether the person intended it or not. What matters here is the word that he chose to use willingly when he is of sound mind and accountable. If he intended to utter these words, then the Lawgiver will apply the ruling to him whether he was serious or was joking. This is unlike one who is sleeping or the one who has lost his mind or one who is insane etc, they do not have any real intention and they are not accountable, so the words that they say are idle talk, like the talk of a child who does not understand what he is saying and does not mean it.
The heart of the matter is the differentiation between one who says something deliberately, knowing what he says but not intending to be subject to the ruling on what he says, and one who does not mean it and does not know what it means. There are four categories:

When he intends the ruling but does not utter the words
When he does not intend the ruling or the words
When he intends the words but not the ruling
When he intends both the words and the ruling.

The first two are idle talk, and the second two carry weight. This is what may be understood from all the texts and rulings. (End quote from Zad Al-Ma`ad, 5/204, 205)
The Rational Basis for Divorce Validity in Jest
Shaykh Ibn `Uthaymin (may Allah have mercy on him) said in Ashl-Sharh Al-Mumti` (10/461):
Divorce takes place whether uttered in seriousness or in jest. The difference between them is that the one who is serious intends both the words and the ruling, whereas the one who is joking intends the words but not the ruling.
The one who is serious divorces his wife and intends divorce. The joker intends to say the words but does not intend the ruling. So he says, for example, “I was joking with my wife”, or “I was joking with my friend, and I said: ‘My wife is divorced’ or some such.” And he says: “I did not intend that she should be divorced, rather I intended to say the words.”
We say: The ruling applies in this case, because you have uttered the words, and the ruling is up to Allah.
So long as the word of divorce is uttered with a valid intention by a person who is of sound mind and can understand what it means, then it counts as such. Even if he says, “I did not mean it as such,” it is not up to him, rather it is up to Allah.
This is from the rational point of view.
With regard to the reports, we have the report of Abu Hurayrah (may Allah be pleased with him): “There are three matters in which seriousness is serious and joking is serious: marriage, divorce and taking back (one’s wife).” This is the evidence from the texts.
Some of the scholars said that a divorce issued in jest does not count; how can the divorce of one who is joking count when all he intended was to speak the words? Some of the scholars rebuked those who say that the divorce of one who is joking counts as such and said: You say that he is joking so how can you say that it counts as such, and take him seriously?
The response to these people is: we are only saying what is indicated by the evidence. This Hadith was classed as authentic by some and as sound by others. There is no doubt that it counts as evidence, so we follow it.
Moreover, reason implies it, because if we open this door, everyone will make such claims, in which case there will be no more divorce on earth. The correct view is that it does count as such, whether he was serious or was joking.
Moreover, if we say that it counts as such, there is the benefit of discipline, which restrains those people who want to play with the words of divorce . If the person who toys with the concept of divorce realizes that he will be called to account for it, he will never do that.
But the one who says “I was joking” opens the door to people to take the rulings of Allah as a joke. (End quote)
And Allah knows best.