Deuteronomy 18:21-22 New International Version (NIV)

21. You may say to yourselves, “How can we know when a message has not been spoken by the Lord?”

22. If what a prophet proclaims in the name of the Lord does not take place or come true, that is a message the Lord has not spoken. That prophet has spoken presumptuously, so do not be alarmed.

Deuteronomy 18