Muhammad bin Ya'qub, from Muhammad bin Yahya, from Ahmad bin Muhammad, from Al-Hasan bin Mahbub, from Al-Husayn bin Na'im Al-Sahhaf, who said:
I said to Abu Abdullah عليه السلام: "My bondwoman sees blood while she is pregnant. What should she do about the prayer?" Imam عليه السلام said: "If a pregnant woman sees blood after twenty days have passed from the time she used to see blood in the month when she would normally menstruate, then that blood is neither from the womb nor menstrual blood. She should perform wudu, use a piece of cotton (kursuf) for protection, and pray. However, if a pregnant woman sees blood shortly before the time she used to see it or during that time in the month, then it is menstrual blood. She should refrain from prayer for the number of days she used to refrain during her menstrual cycle. If the blood stops before that time, she should perform ghusl and pray. If the blood does not stop until after the days she used to see blood have passed by one or two days, she should perform ghusl, use a piece of cotton (kursuf) for protection, secure it tightly, and then pray Dhuhr and Asr. Afterward, she should observe her condition. If the blood between her and Maghrib does not flow behind the kursuf, she should perform wudu and pray at the time of each prayer, as long as she does not remove the kursuf. If she removes the kursuf and the blood flows, she must perform ghusl. If she removes the kursuf and no blood flows, she should perform wudu and pray, and ghusl is not required. If the blood flows continuously from behind the kursuf, dripping without stopping, she must perform ghusl three times daily and nightly, secure herself with kursuf, and pray. She should perform ghusl for Fajr, another for Dhuhr and Asr, and a third for Maghrib and Isha. The same applies to the mustahadah (a woman experiencing irregular bleeding). If she follows this procedure, Allah سبحانه وتعالى will remove the blood from her.