كتاب الطلاق
18  
The Book of Divorce
(1)
Chapter: The prohibition of divorcing a menstruating woman without her consent; If a man breaks this rule, it still counts as a divorce, and he should be ordered to take her back
(1)
باب تَحْرِيمِ طَلاَقِ الْحَائِضِ بِغَيْرِ رِضَاهَا وَأَنَّهُ لَوْ خَالَفَ وَقَعَ الطَّلاَقُ وَيُؤْمَرُ بِجْعَتِهَا
Sahih Muslim 1471 a

Ibn 'Umar (Allah be pleased with them) reported that he divorced his wife while she was menstruating during the lifetime of Allah's Messenger (ﷺ). 'Umar b. Khattib (Allah be pleased with him) asked Allah's Messenger (ﷺ) about it, whereupon Allah's Messenger (ﷺ) said:

Command him ('Abdullah b. 'Umar) to take her back (and keep her) and pronounce divorce when she is purified and she again enters the period of menstruation and she is again purified (after passing the period of menses), and then if he so desires he may keep her and if he desires divorce her (finally) before touching her (without having an intercourse with her), for that is the period of waiting ('ldda) which God, the Exalted and Glorious, has commanded for the divorce of women.
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى التَّمِيمِيُّ، قَالَ قَرَأْتُ عَلَى مَالِكِ بْنِ أَنَسٍ عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، أَنَّهُ طَلَّقَ امْرَأَتَهُ وَهْىَ حَائِضٌ فِي عَهْدِ رَسُولِ اللَّهِ صلى الله عليه وسلم فَسَأَلَ عُمَرُ بْنُ الْخَطَّابِ رَسُولَ اللَّهِ صلى الله عليه وسلم عَنْ ذَلِكَ فَقَالَ لَهُ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ مُرْهُ فَلْيُرَاجِعْهَا ثُمَّ لْيَتْرُكْهَا حَتَّى تَطْهُرَ ثُمَّ تَحِيضَ ثُمَّ تَطْهُرَ ثُمَّ إِنْ شَاءَ أَمْسَكَ بَعْدُ وَإِنْ شَاءَ طَلَّقَ قَبْلَ أَنْ يَمَسَّ فَتِلْكَ الْعِدَّةُ الَّتِي أَمَرَ اللَّهُ عَزَّ وَجَلَّ أَنْ يُطَلَّقَ لَهَا النِّسَاءُ‏"‏ ‏.‏
Reference : Sahih Muslim 1471a
In-book reference : Book 18, Hadith 1
USC-MSA web (English) reference : Book 9, Hadith 3473
  (deprecated numbering scheme)