It was narrated that Anas bin Seereen said:
I asked Ibn `Umar about his wife whom he divorced. He said: I divorced her when she was menstruating, and I told ‘Umar about that, and he told the Prophet (ﷺ) , who said: `Tell him to take her back, then when she becomes pure, he may divorce her when she is pure.” He said: So I took her back, then I divorced her when she was pure. I said: Was that divorce that you gave her when she was menstruating counted as such?` He said: Why wouldn`t I count it? It must be counted even if I failed and acted foolishly.