I pray regularly, but sometimes my mind gets distracted. Does this invalidate my prayer, even though I avoid past sins? What factors determine the validity or invalidity of a prayer?

MindSalah (Prayers)Sin
I pray regularly, but sometimes my mind gets distracted. Does this invalidate my prayer, even though I avoid past sins? What factors determine the validity or invalidity of a prayer?
Sayyed Mohammad Al-Musawi, Sayyed Mohammad al-Musawi is originally from Iraq and heads up the World Ahlul Bayt Islamic League in London. Other than being involved in various humanitarian projects, he frequently responds to... Answer updated 5 months ago

When your mind gets distracted from your Prayers, it does not invalidate your Prayer though it is not the good situation of Prayers.

Your Prayers are valid as far as your Wudhu is valid and your body and clothes are Tahir (pure) and you perform all the obligatory acts of Salah.

It is very good to keep your mind in your Prayers but if your mind gets distracted, your Salah remains valid.

Wassalam