All perfect praise be to Allah, The Lord of The Worlds, and may His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
According to the four schools of law in Islam,it is forbidden for the woman in post-natal bleeding (Nafas) and menses (Haid) and the person who is in a state of ceremonial impurity (Junub) to stay in the mosque. This is clearly stated in the verse: "O ye who believe! Approach not prayers with a mind befogged, until ye can understand all that ye say,- nor in a state of ceremonial impurity (Except when travelling on the road), until after washing your whole body." {An-Nisa`, 43}. "……..nor in a state of ceremonial impurity (Except when travelling on the road), until after washing your whole body."
According to Ibn Abbas and other companions (May Allah be pleased with them), this verse means that you aren`t allowed to enter the mosque while in a state of ceremonial impurity, except when travelling on the road.
Al-Hafith Ibn Khatheer cited this interpretation in his book [Tafseer Al-Quran Al-Atheem, vol./pp.311] where he said: "Based on this verse, many an Imam have concluded that it is forbidden for the Junubperson to stay in the mosque, but he/she is permitted to pass through it, and this ruling goes for the woman in post-natal bleeding and menses. However, some scholars said that the latter are forbidden to pass through the mosque to avoid dirtying it. Others said that if they made sure that they can pass without dirtying it, then they are allowed to. Moreover, it was narrated that 'Aishah said: "The Messenger of Allah said to me: "Get me a mat from the mosque.' I said: "I am menstruating.' He said: "Your menstruation is not in your hand." {Sahih Muslim}. This Hadith indicates that it is permissible for the woman in menses to pass through the mosque, and by analogy, this goes for the woman in post-natal bleeding."
In addition, some scholars have arrived at the above forbiddance through the following Hadith: " Allah's messenger (PBUH) said: "It is not permitted for a menstruating woman or one who is junub (sexually impure) to stay in the mosque." {Related by Abu Dawud and Ibn Al-Molakin graded it as Sahih}. Accordingly, the woman who stayed in the mosque while having menses has incurred sin and should seek Allah`s pardon and make repentance. As for her Omrah, it is considered valid and isn`t nullified by her being in that state. And Allah Knows Best.