Later Hanafi authorities cited in Radd al-Muhtar adopted a broad leniency for ordinary I'rab/vowel mistakes because many people cannot reliably distinguish all grammatical endings. Earlier authorities were stricter where the altered meaning became seriously corrupt.
For a beginner, the safe teaching point is:
• do not declare a prayer invalid merely because a Fathah, Kasrah, Dammah or grammatical ending was mistaken;
• if the error creates a serious doctrinal/meaning problem, it should be referred to a qualified scholar rather than applying a simplistic automatic rule.