Q: Is my prayer invalid if I forget or ignorantly make a mistake with an obligation of the prayer?
A: The obligations of prayer include the takbīrs to move, tasmī, taḥmīd; the first tasbīḥah in bowing and prostration, “My Lord forgive me” between the two prostrations for everyone, the first tashahhud and its sitting.
If any of these are intentionally abandoned, the prayer is invalid. If, however, they are forgotten or unknowingly abandoned e.g. done incorrectly, they are voided, do not invalidate prayer, and require the prostration of forgetfulness.
Sources: Kashshāf al-Qināʿ, ʿUmdat al-Ṭālib.