Exodus 23:2

You shall not follow the crowd in doing evil. Neither shall you go astray in judgment, by agreeing with the majority opinion, apart from the truth

Other versions

King James Version

Thou shalt not follow a multitude to do evil; neither shalt thou speak in a cause to decline after many to wrest judgment:

English Standard Version

You shall not fall in with the many to do evil, nor shall you bear witness in a lawsuit, siding with the many, so as to pervert justice,

New International Version

"Do not follow the crowd in doing wrong. When you give testimony in a lawsuit, do not pervert justice by siding with the crowd,