It is narrated from Ibn Umar (may Allah be pleased with them both) that he divorced his wife during the time of the Messenger of Allah (ﷺ) while she was menstruating. Umar (may Allah be pleased with him) said: I asked the Messenger of Allah (ﷺ) about this, so he (ﷺ) said: "Tell Ibn Umar to take his wife back, then keep her in his marriage until she becomes pure from her menstruation. Then she should menstruate again and then become pure. Then, if he wishes, he may keep his wife in marriage, and if he wishes, he may divorce her before having intercourse with her. This is the prescribed period of purity in which Allah has commanded the women to be divorced."
Hadith Referenceمسند الإمام الشافعي / كتاب الطلاق / 1238
Hadith Takhrijاخرجه البخاري ،الطلاق، باب وقول الله تعالى ﴿يايها النبى اذا .....﴾ (5251) ومسلم، الطلاق، باب تحريم طلاق الحائض بغير رضاها ..... الخ (1471)۔