Deuteronomy 18:21-22 English Standard Version (ESV)

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.

Deuteronomy 18