Shaykh al-Islam Ibn Taymiyah (may Allaah have mercy on him) was asked:
Is the prayer of one who mispronounces al-Faatihah valid or not?
He replied:
If a person mispronounces al-Faatihah in a way that does not distort the meaning, his prayer is valid, whether he is leading others in prayer or is praying alone.
But with regard to the kind of mispronunciation that distorts the meaning, if the person knows the meaning, such as if he says ‘Siraat allaadheenaan’amtu ‘alayhim [meaning “The way of those on whom I have bestowed my grace”, instead of the correct version an’amta (The way of those on whom You have bestowed Your Grace)], and he knows that this verbal form is wrong, then the prayer is not valid. But if he does not know that he is distorting the meaning, and he thinks that this form is second person singular rather than first person, then there is a difference of scholarly opinion on this point. And Allaah knows best.
Majmoo’ al-Fataawam 22/443
He was also asked about when a person ends a word with –i that should end in –a when praying (or renders it genitive when it should be accusative).
He replied:
If he is aware of what he is doing and he does it deliberately, then his prayer is invalid, because he is playing about in his prayer. But if he is unaware of that, then his prayer is not invalid, according to one of the two scholarly views.
Majmoo’ al-Fataawa, 22/444