Sahih Bukhari Volume 7, Book 63, Hadith Number 184.

Narrated By Abi Ghallab Yunus bin Jubair : I asked Ibn ‘Umar,”(What is said regarding) a man divorces his wife during her period?” He said, “Do you know Ibn ‘Umar? Ibn ‘Umar divorced his wife while she was menstruating. ‘Umar then went to the Prophet and mentioned that to him. The Prophet ordered him to take her back and when she became clean, he could divorce her if he wanted.” I asked (Ibn ‘Umar), “Was that divorce counted as one legal divorce?” He said, “If one becomes helpless and foolish (will he be excused? Of course not).”