Deuteronomy 18:21-22

21 “But you may wonder, ‘How will we know whether or not a prophecy is from the Lord?’ 22 If the prophet speaks in the Lord’s name but his prediction does not happen or come true, you will know that the Lord did not give that message. That prophet has spoken without my authority and need not be feared.