He divorced his wife while she was menstruating during the time of the Messenger of Allah ﷺ. Umar bin Khattab asked the Messenger of Allah ﷺ about this, and the Messenger of Allah ﷺ said, "Order him to take her back, then keep her until she becomes pure, then menstruates again, then becomes pure once more. After that, if he wishes, he may keep her, and if he wishes, he may divorce her before touching her. That is the waiting period that Allah commanded for the divorce of women."
حدثنا إسماعيل بن عبد الله قال حدثني مالك عن نافع
أنه طلق امرأته وهي حائض على عهد رسول الله ﷺ فسأل عمر بن الخطاب رسول الله ﷺ عن ذلك فقال رسول الله ﷺ مره فليراجعها ثم ليمسكها حتى تطهر ثم تحيض ثم تطهر ثم إن شاء أمسك بعد وإن شاء طلق قبل أن يمس فتلك العدة التي أمر الله أن تطلق لها النساء