Praise be to Allaah.
This is known as the issue of “correcting the imaam”.
Correcting the imaam is divided into two categories:
That which is obligatory, which is correcting the imaam concerning something which would invalidate the prayer if done deliberately. If he makes a grammatical mistake which changes the meaning of al-Faatihah, then he must be corrected, because this type of mistake which changes the meaning of al-Faatihah invalidates the prayer. Similarly, if he omits a verse of al-Faatihah, he must be corrected, because that invalidates the prayer. The kind of correction which is mustahabb (recommended) is when the imaam makes a mistake which does not invalidate the prayer altogether, but it does undermine the perfection of the prayer. So if the imaam forgets to recite another soorah after al-Faatihah, alerting him to this fact is sunnah.
The evidence for that is the words of the Prophet (peace and blessings of Allaah be upon him): “I am a human being like you, I forget as you forget. If I forget, then remind me.” (narrated by al-Bukhaari, al-Salaah, 401). So he commanded them to remind him. On one occasion when he became hesitant in his recitation, he said to Ubayy ibn Ka’b, “What stopped you?”, i.e., what stopped you from correcting me? This indicates that correcting the imaam is something that is essential.
See al-Sharh al-Mumti’ by Ibn ‘Uthaymeen, part 3, p. 346-347