Deuteronomy 18:22

22 If 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.

Deuteronomy 18:22 In-Context

20 But any prophet who speaks in the name of other gods, or who presumes to speak in my name a word that I have not commanded the prophet to speak—that prophet shall die."
21 You may say to yourself, "How can we recognize a word that the Lord has not spoken?"
22 If 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.
New Revised Standard Version Bible, copyright 1989, Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.