Well, God can't be wrong, and if a prophet claims to be speaking for the Lord, or saying something the Lord told him, or is relating a vision that the Lord gave him, it has to be correct, or it can't be from God, right? God cannot lie or be mistaken, can He?
But...
If the prophet predicts something in the LORD's name and it does not happen, the LORD did not give the message. That prophet has spoken on his own and need not be pondered. Deut 18:22
So a prophet who predicts peace must carry the burden of proof. Only when his predictions come true can it be known that he is really from the LORD." Jeremiah 28:9
Again a message came to me from the LORD: "Son of man, what is that proverb they quote in Israel: 'Time passes, making a liar of every prophet'? Give the people this message from the Sovereign LORD: I will put an end to this proverb, and you will soon stop quoting it. Now give them this new proverb to replace the old one: 'The time has come for every prophecy to be fulfilled!"Then you will see what becomes of all the false visions and misleading predictions about peace in Israel. For I am the LORD! What I threaten always happens. Ezekiel 12:21
So there you have it. True prophets who speak from the Lord and not from themselves are ALWAYS right. Being wrong once casts a prophet's connection to God in doubt.