The Cow - 2:256
There is no compulsion in religion. So the truth is separated from error. Whoever disbelieves in Taghut (despots and evil doctrines) and believes in Allah, he has clung to an unbreakable and firm bond. Allah Hears, Knows.
How does Allah distinguish righteousness from error?
Prophet Jonah/10:32
This is Allah, your true Lord. Then what remains after the truth but error? How are you turned away?
The Thunder/13:17
He sends down water from the sky, and the streams overflow with it and the flood is laden with foam. In the same way, they obtain a similar foam from the materials they melt to make jewelry or objects. Allah introduces the truth and falsehood by such an example. The foam disappears, but that which is useful to mankind remains in the ground. This is how Allah gives examples.
The Prophets/21:18
Nay, We throw the truth upon falsehood and it crushes and destroys it. Woe to you for what you ascribe.
Sheva/34:48
"Say, "My Lord makes the truth effective. He is the Knower of all mysteries."
Sheva/34:49
"Say, "The truth has come, and falsehood can neither start a new thing nor repeat it."
Council/42:24
"Do they say, "Has he fabricated a lie about Allah"? If Allah wills, He can seal your heart. Allah erases falsehood and establishes truth in His words. He knows the most secret thoughts."
The Thunder/13:1
A.L.M.R. These (letters) are the miracles of the Book. That which has been sent down to you from your Lord is the truth, but most of the people do not believe.