Imam al-Shafi'i (may Allah have mercy on him) says: When a woman being in front does not invalidate the prayer, then if she is on the right or the left, all the more so it will not be invalidated.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5228