A woman miscarried during the third month of her pregnancy
on the first day of Ramadan. She did not fast for the first five days of the month because of the bleeding after the miscarriage. Blood continued to remain in her vagina; however it did not pass the vaginal opening. Thus, she performed her prayers and continued fasting for the next twenty five days. Is her Sawm (fasting) and Salah (prayer) valid in this case? It should also be mentioned that she performed Wudu' (ablution) for each prayer. Even until now she is still in the same condition; (there is still blood and wetness inside the vagina). She also mentioned that she was using contraceptives and tablets to prevent the onset of menstruation before becoming pregnant.
If the reality is as you mentioned with regard to the miscarriage taking place during the third month, then this blood is not considered postpartum bleeding. This is because that which she miscarried was still just a clot as opposed to being a human being at that time. Therefore, her Sawm and Salah are valid even though she finds blood in her vagina so long as she performs Wudu' for every Salah as was mentioned in your question. Also, she is required to make up for the Sawm and Salah she missed for five days. This bleeding is considered to be Istihadah (abnormal vaginal bleeding outside the menstrual or post-partum period). (Part No. 10; Page No. 219) May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.