validity of a marriage
Question

                What is the validity of a marriage in this situation: A man has a sexual relationship with a woman. The relationship results in a pregnancy. When the pregnant is in the third month they get married. The couple repent for the relationship, and continue to live as husband and wife for another 20 years or so as good muslims and they have 5 children in total.
Some scholars referring to Aya 3 of Surat Noor say the marriage is void. Please advice. If it is Void is there a way of making it Halaal I will appreciate it highly if .
Praise be to Allah.Your wife’s brother can assume
      the (wali) position. If there is not a brother then an uncle would do. He
      second eldest son would also do, if he is an adult. In the absence of all
      of these, an Islamic judge or the head of the Islamic center can renew the
      contract. You don’t have to tell anyone about the reason. You can say
      that you just want to renew it because you don’t feel good about the
      first one. Publicity is not needed at all. There was an addition to my
      answer to you, but apparently it was lost for one reason or another. Here
      is the full answer once again:
The marriage
      contract is void because it was made without fulfilling its necessary
      conditions. One of these conditions is the readiness of the womb. This
      means that the woman whom is to get married must have her womb unoccupied.
      For example, a man may not marry a woman who is pregnant. He may not marry
      a woman who was divorced until she is out of her idd’ah (a period where
      a widow or a divorced woman may not marry). Also a man may not marry a
      woman he has been having intercourse with until they both repent and she
      gets her monthly period. This is a sign that her womb is clean. The
      Prophet forbade Muslims to have intercourse with female slaves they bought
      recently until they are certain that their wombs are clear from any
      pregnancy. Waiting for the monthly period does this. In your case, the
      marriage contract must be renewed. This is not a difficult thing to do.
      The first boy is not Islamicly your son, as he was not created in his
      mother’s womb through a valid marriage contract. Some scholars say he is
      not to be called after you as he is born out of adultery. He is to be
      called after his mother’s family. He is not to inherit you and you are
      not to inherit him. As for the remaining children, they are yours and they
      carry your name. Other scholars, such as Ibn Taymiyah and Ibn AlQayyim say
      that if the woman is not married at the time of committing adultery, then
      the adulteress father may give his name to this boy and that he may be
      treated as his son. In your case, this last opinion may be the most
      suitable for you and your family. Yet you must renew your marriage
      contract at any Islamic center, and Allah knows best.