Deuteronomy 18:20-22 New American Bible, Revised Edition (NABRE)

20. But if a prophet presumes to speak a word in my name that I have not commanded, or speaks in the name of other gods, that prophet shall die.

21. Should you say to yourselves, “How can we recognize that a word is one the Lord has not spoken?”,

22. if a prophet speaks in the name of the Lord but the word does not come true, it is a word the Lord did not speak. The prophet has spoken it presumptuously; do not fear him.

Deuteronomy 18