I divorced my wife during the lifetime of Messenger of Allah ﷺ when she was in the state of menses. 'Umar (Allah be pleased with him) made a mention of it to Messenger of Allah ﷺ, whereupon he said: Command him to take her back and leave her (in that state) until she is purified. Then (let her) enter the period of second menses, and when she is purified, then divorce her (finally) before having a sexual intercourse with her, or retain her (finally). That is the 'Idda (the prescribed period) which Allah commanded (to be kept in view) while divorcing the women. 'Ubaidullah reported: I said to Nafi': What became of that divorce (pronounced within 'Idda)? He said: It was as one which she counted. (Using translation from Muslim 1471c)
طَلَّقْتُ امْرَأَتِي عَلَى عَهْدِ رَسُولِ اللهِ ﷺ وَهِيَ حَائِضٌ فَذَكَرَ ذَلِكَ عُمَرُ ؓ لِرَسُولِ اللهِ ﷺ فَقَالَ رَسُولُ اللهِ ﷺ مُرْهُ فَلْيُرَاجِعْهَا حَتَّى تَطْهُرَ ثُمَّ تَحِيضَ حَيْضَةً أُخْرَى فَإِذَا طَهُرَتْ فَلْيُطَلِّقْهَا إِنْ شَاءَ قَبْلَ أَنْ يُجَامِعَهَا أَوْ يُمْسِكْهَا فَإِنَّهَا الْعِدَّةُ الَّتِي أَمَرَ اللهُ تَعَالَى أَنْ تُطَلَّقَ لَهَا النِّسَاءُ فَقُلْتُ لِنَافِعٍ مَا صَنَعَتِ التَّطْلِيقَةُ؟ قَالَ وَاحِدَةً اعْتَدَّتْ بِهَا