1,200. Disqualified Witnesses
181:21 If a witness is related to one of the litigants, to one of the judges, or to another witness, even if they are related on their wives' sides, they are sometimes disqualified from testifying. Even if they are only related to the co-signer and not to the borrower, they may not testify on behalf of the borrower. The Torah disqualifies testimony from relatives not because they are assumed to love each other because they are disqualified from testifying whether for or against their relatives. Rather, this is simply a decree of the Torah. Even Moshe and Aaron, who were beyond reproach, were disqualified from being able to testify for one another. Therefore, if a witness is related to any of the people named above - or if they were related by marriage but such is no longer the case - if the judges don't know, they must be informed. The judges will then inform the witness whether or not his relationship disqualifies him from testifying.
181:22 If one of the two witnesses knows that the other is wicked and unfit to testify according to the Torah but the judges don't know, he may not testify together with him even though his testimony is truthful. This is from Exodus 23:1, "don't place your hand with the wicked to be an unrighteous witness." The Torah tells us that the entire testimony is invalid even if there are many witnesses if one of them is disqualified. And who is a wicked person disqualified from testifying by the Torah? Anyone who willfully violates something that is recognized in Israel as a sin from the Torah and he doesn't repent. However, if it's possible that he sinned accidentally, or out of ignorance because he didn't know it was prohibited, then the witness is not disqualified from testifying.