Deuteronomy 18:20-22 New English Translation (NET)

20. “But if any prophet presumes to speak anything in my name that I have not authorized him to speak, or speaks in the name of other gods, that prophet must die.

21. Now if you say to yourselves, ‘How can we tell that a message is not from the Lord?’ –

22. whenever a prophet speaks in my name and the prediction is not fulfilled, then I have not spoken it; the prophet has presumed to speak it, so you need not fear him.”

Deuteronomy 18