All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
For the fasting of the woman to be valid, it is conditioned that she experiences neither menstruation nor postpartum bleeding.
When menstruation stops, even if only a moment before dawn, and she makes her intention to fast, then her fast is valid, even if she made Ghusl after the break of dawn. This is applicable unless she experiences menstrual blood discharge before the completion of fifteen days of purity, the minimum period of purity. In the latter case, she has to make up these fasts because she was menstruating. This is according to one of the two relevant opinions. According to the other opinion, days when there is menstrual bleeding are considered menstruation and days when there is no menstrual bleeding are considered a period of purity. Given the last opinion, that woman is not required to make up fasting.
Though acting according to the second opinion is accepted, adopting the first one is more cautious.
Consequently, when a woman experiences purity on the fourth day and then blood is discharged on the fifth day, she has to make up the fast of the fourth day (according to the first opinion). If she did not experience purity by seeing one of its two signs, dryness of the vulva or the white discharge, then her fasting is invalid in the first place because her menstruation did not actually stop.
Allaah Knows best.