3 years ago I was in a Haram relation with a woman but ended it and repented. I used to pray in her home when time for prayer came. Are those past prayers invalid due to the fact I was praying in her home ? I believe prayer to the mosque is a communal obligation and mosques are far from my home.

Ustadh AbdulAziz al-Haqqan
The salah is valid and Alhamdulilah that you have repented.