Deuteronomy 18:18-22

ISV(i) 18 I will raise up a prophet like you from among their relatives, and I will place my words in his mouth so that he may expound everything that I have commanded to them. 19 But if someone will not listen to those words that the prophet speaks in my name, I will hold him accountable. 20 Even then, if the prophet speaks presumptuously in my name, which I didn’t authorize him to speak, or if he speaks in the name of other gods, that prophet must die.’ 21 Now you may ask yourselves, ‘How will we be able to discern that the LORD has not spoken?’ 22 Whenever a prophet speaks in the name of the LORD, and the oracle does not come about or the word is not fulfilled, then the LORD has not spoken it. The prophet will have spoken presumptuously, so you need not fear him.”