كتاب الطلاق
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 l

Ayyub reported a hadith like this with the same chain of narrators and he said:

Umar (Allah be pleased with him) asked Allah's Apostle (ﷺ) about it and he commanded him that he should take her back until she is divorced in the state of purity without having a sexual intercourse with her, and said: Divorce her in the beginning of her 'Idda or her 'Idda commences.
وَحَدَّثَنَا عَبْدُ الْوَارِثِ بْنُ عَبْدِ الصَّمَدِ، حَدَّثَنِي أَبِي، عَنْ جَدِّي، عَنْ أَيُّوبَ، بِهَذَا الإِسْنَادِ وَقَالَ فِي الْحَدِيثِ فَسَأَلَ عُمَرُ النَّبِيَّ صلى الله عليه وسلم عَنْ ذَلِكَ فَأَمَرَهُ أَنْ يُرَاجِعَهَا حَتَّى يُطَلِّقَهَا طَاهِرًا مِنْ غَيْرِ جِمَاعٍ وَقَالَ ‏ "‏ يُطَلِّقُهَا فِي قُبُلِ عِدَّتِهَا ‏"‏ ‏.‏
Reference : Sahih Muslim 1471l
In-book reference : Book 18, Hadith 12
USC-MSA web (English) reference : Book 9, Hadith 3483
  (deprecated numbering scheme)