All praise is due to Allah alone, and may the Salah and Salam of Allah be upon our Prophet Muhammad, his family and his companions. To answer your question, we say while seeking all the success from Allah: The marriage contract is correct and pregnancy is legal because it occurred during a valid marriage relationship. This is because the ruling that a person who does not pray is a disbeliever is not valid, until after the proof is known to the one who does not pray and the relevant authorities that advise and order them to repent is informed.
Your brother,
Khalid al-Muslih
17/02/1425