Deuteronomy 13:1-5 ESV
“If a prophet or a dreamer of dreams arises among you and gives you a sign or a wonder, and the sign or wonder that he tells you comes to pass, and if he says, ‘Let us go after other gods,’ which you have not known, ‘and let us serve them,’ you shall not listen to the words of that prophet or that dreamer of dreams. For the LORD your God is testing you, to know whether you love the LORD your God with all your heart and with all your soul. You shall walk after the LORD your God and fear him and keep his commandments and obey his voice, and you shall serve him and hold fast to him. But that prophet or that dreamer of dreams shall be put to death, because he has taught rebellion against the LORD your God, who brought you out of the land of Egypt and redeemed you out of the house of slavery, to make you leave the way in which the LORD your God commanded you to walk. So you shall purge the evil from your midst.
ESV: English Standard Version 2016