Deut 18:21-22

21You may say to yourself, “How can we recognize a word that the Lord has not spoken?”22If a prophet speaks in the name of the Lord but the thing does not take place or prove true, it is a word that the Lord has not spoken. The prophet has spoken it presumptuously; do not be frightened by it.