If a man does not know that a woman is observing ʿiddah and he marries her, in the event that the woman did not know either and a child is born to them, he is regarded as being of legitimate birth and is legally the child of both of them. However, if the woman knew that she was observing ʿiddah and that marrying while observing ʿiddah is not legally permitted, then he is the child of the father.
In each case, the marriage contract is void, and as previously explained, the man and the woman are forever unlawful for each other.