This excerpt is taken from the book of Fadhilat al-Shaykh Mubashir Ahmad Rabbani, may Allah have mercy on him, Ahkam wa Masail Ramadan.
Does wet dream, bleeding from the body, and vomiting invalidate the fast?
Question:.
I was fasting and fell asleep in the mosque. When I woke up, I realized that I had a wet dream. Does a wet dream affect the fast? Please note that I did not take a bath and performed the prayer without bathing. Once, I hit my head and blood flowed from it. Does my fast break due to the bleeding? Similarly, does vomiting invalidate the fast or not? I hope you will benefit me with your response.
Fatwa:.
A wet dream does not invalidate the fast because it is beyond a person's control. However, when semen is released, it is obligatory to perform Ghusl (ritual purification). This is because when the Prophet (peace be upon him) was asked about this matter, he said that when a person sees the water of a wet dream, meaning semen, it is obligatory for him to perform Ghusl.
Reference: (Abu Dawood, Book of Purification, Chapter on a man who finds wetness in his sleep: 236, Tirmidhi, Book of Purification, Chapter on what has been narrated about one who wakes up and sees wetness: 113, Ibn Majah: 612)
As for the prayer you performed without Ghusl, that was a mistake on your part and it is a very serious matter. Now it is necessary for you to repeat that prayer and also repent to Allah, the Exalted. And the stone that hit your head causing blood to flow will not invalidate your fast. And the vomit that came out of you was also beyond your control, so your fast is not invalidated. Because the Prophet (peace be upon him) said:
من ذرعه القيء فلا قضاء عليه، ومن استقاء فعليه القضاء
“Whoever vomits involuntarily, there is no expiation for his fast, and whoever vomits deliberately, he must make up for it.”
Reference: (Abu Dawood, Book of Fasting, Chapter on the fasting person who vomits deliberately: 2380, Tirmidhi, Book of Fasting, Chapter on what has been narrated about one who vomits deliberately: 720, Ibn Majah: 1676)