Deuteronomy 18:21–22
21 And if you say in your heart, ‘How may we know the word that the Lord has not spoken?’— 22 when a prophet speaks in the name of the Lord, if the word does not come to pass or come true, that is a word that the Lord has not spoken; the prophet has spoken it presumptuously. You need not be afraid of him.
Jeremiah 28:9
9 As for the prophet who prophesies peace, xwhen the word of that prophet comes to pass, then it will be known that the Lord has truly sent the prophet.”