Salah is invalidated by speaking deliberately, eating or drinking, excessive unnecessary movement, leaving the qibla, or losing wudu. If a required pillar of the prayer is omitted, the prayer is not valid until corrected.
References
No specific citation was provided for this answer. Verify with a qualified scholar and the primary sources.
Informational, not a personal fatwa. Consult a qualified scholar for rulings on your situation.