Allah, exalted be His praise, says: 'And take as witnesses two just men from among you.' [Surah al-Talaq: 2]
And He said: 'from among those whom you approve of as witnesses.' [Surah al-Baqarah: 282]
Imam al-Shafi'i (may Allah have mercy on him) said: "And we do not approve of the sinful (fasiq) among us; approval applies only to the just among us."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / Q20631
Rabi'ah bin Abi Abd al-Rahman (may Allah have mercy on him) says that a man from Iraq came to Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) and said: I have come to you about a matter that has neither head nor tail. Sayyiduna Umar (may Allah be pleased with him) asked: What is it? He said: False testimony has appeared in our land. He said: Has that really happened? He said: Yes. Sayyiduna Umar (may Allah be pleased with him) said: No, by Allah! No man in Islam shall be imprisoned except on the testimony of just witnesses.
Abu Ubayd said: 'La yu'sar' means he shall not be imprisoned.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20631
Ibn Sirin (may Allah have mercy on him) narrates from Qadi Shurayh (may Allah have mercy on him) that he said: Claim whatever you wish, but bring just witnesses, for our judgment rests only on just witnesses; and go and inquire about him.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20632