Is the fasting observed while one is in the state of janabah (major impurity) valid?
The state of janabah is not an obstacle for fasting. In this regard, it does not matter whether the situation that causes the state of janabah happens before beginning to fast, or caused by a reason that does not invalidate fasting such as having wet dream while fasting. However, those who are junub need to have a bath and get cleaned as soon as possible. One prayer time should not pass upon being in the state of janabah. It is a sinful act to delay ghusl longer than one prayer time. Because if it is delayed, the prayer will also be unperformed (Ibn Abidin, Radd al-Muhtar, III, 372).
Source: Presidency Of Religious Affairs The Turkey, High Board of Religious Affairs FATWAS,