Ibn Abbas (may Allah be pleased with them both) said that the Messenger of Allah (peace and blessings be upon him) said: "There is no human being" and then he mentioned the same meaning.
Imam al-Shafi'i (may Allah have mercy on him) said: If obedience and muru'ah (decency) prevail in a man's outward conduct, his testimony will be accepted. If his outward conduct is disobedient and contrary to muru'ah, his testimony will be rejected.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20749