Ibn Umar reported that he divorced his wife while she was menstruating, so Umar asked the Messenger of Allah ﷺ about it. He said, "Tell him to take her back until she becomes pure, then menstruates, then becomes pure again. After that, he may either divorce her or keep her."
عن ابن عمر أنه طلق امرأته وهي حائض فسأل عمر عن ذلك رسول الله ﷺ فقال: مره فليراجعها حتى تطهر، ثم تحيض، ثم تطهر، ثم يطلق بعد أو يمسك.
Muslim (1471:6) narrated it from Ahmad bin Uthman bin Hakeem Awdi, who said, Khalid bin Mukhlad narrated to us, who said, Sulayman, that is Ibn Bilal, narrated to me, who said, Abdullah bin Dinar narrated to me, and he mentioned it.The second angle is that he commanded him to take her back. Then, once she becomes pure, he should divorce her during that period of purity.