Deuteronomy 18:21

21 You may say to yourselves, “How can we know when a message has not been spoken by the LORD?”

Read Deuteronomy 18:21 Using Other Translations

And if thou say in thine heart, How shall we know the word which the LORD hath not spoken?
And if you say in your heart, 'How may we know the word that the LORD has not spoken?'--
“But you may wonder, ‘How will we know whether or not a prophecy is from the LORD ?’