שֶׁלֹּא יָעִיד בַּעַל עֲבֵרָה – שֶׁלֹּא נְקַבֵּל עֵדוּת אִישׁ חוֹטֵא וְלֹא נַעֲשֶׂה בִּשְׁבִיל עֵדוּתוֹ שׁוּם דָּבָר, שֶׁנֶּאֱמַר (שמות כג א) אַל תָּשֶׁת יָדְךָ עִם רָשָׁע לִהְיֹת עֵד חָמָס. וּבָא הַפֵּרוּשׁ (סנהדרין כז א) אַל תָּשֶׁת רָשָׁע עֵד, אַל תָּשֵׁת חָמָס עֵד, כְּלוֹמַר בַּעַל חָמָס, לְהוֹצִיא אֶת הַחַמְסָנִין וְאֶת הַגַּזְלָנִין שֶׁהֵם פְּסוּלִין לְעֵדוּת, שֶׁנֶּאֱמַר כִּי יָקוּם עֵד חָמָס בְּאִישׁ (דברים יט טז) Not to have a sinner testify: That we not accept the testimony of a man who sins, and we not do anything on account of his testimony, as it is stated (Exodus 23:1), “do not place your hand with an evildoer to be a violent witness.” And the explanation comes about this (Sanhedrin 27a), “Do not place an evildoer as a witness, do not place a violent one as a witness,” meaning a violent person — to exclude violent people and thieves who are disqualified from testimony, as it is stated (Deuteronomy 19:16), “If a violent witness comes upon a man.”
שֹׁרֶשׁ מִצְוָה זוֹ נִגְלֶה, שֶׁכָּל מִי שֶׁעַל עַצְמוֹ לֹא חָס וְלֹא יָחוּס עַל מַעֲשָׂיו הָרָעִים, לֹא יָחוּס עַל אֲחֵרִים, וְעַל כֵּן אֵין רָאוּי לְהַאֲמִינוֹ בְּדָבָר. The roots of the commandment are revealed — that anyone who is not concerned about himself and not concerned about his evil deeds will not be concerned about others. And therefore, it is not fit to believe him about a thing.
מִדִּינֵי הַמִּצְוָה, מָה שֶׁאָמְרוּ זִכְרוֹנָם לִבְרָכָה (רמב"ם עדות ט א) שֶׁעֲשָׂרָה הֵן הַפְּסוּלִין לְעֵדוּת מִן הַתּוֹרָה, וְאֵלּוּ הֵן: נָשִׁים, וַעֲבָדִים, וּקְטַנִּים, חֵרְשִׁים, שׁוֹטִים, סוּמִים, רְשָׁעִים, וַאֲנָשִׁים הַבְּזוּיִין בְּיוֹתֵר, וּקְרוֹבִים, וְנוֹגְעִין בְּעֵדוּת, הֲרֵי אֵלּוּ עֲשָׂרָה. וְטֻמְטוּם (רמב"ם שם ג) וְאַנְדְּרוֹגִינוֹס בִּכְלַל נָשִׁים, וּמִי שֶׁחֶצְיוֹ עֶבֶד בִּכְלַל עֲבָדִים. הַנִּכְפֶּה בְּעֵת כְּפִיָּתוֹ בִּכְלַל שׁוֹטֶה. וְגַם שֶׁלֹּא בְּעֵת כְּפִיָּתוֹ, צָרִיךְ הַדַּיָּן לְהִתְיַשֵּׁב בַּדָּבָר אִם דַּעְתּוֹ מְבֻלְבֶּלֶת מִצַּד הַחֹלִי. וְכֵן הַפְּתָאִים בְּיוֹתֵר שֶׁאֵינָם מְבִינִים דְּבָרִים הַסּוֹתְרִין זֶה אֶת זֶה, וְכֵן אֲנָשִׁים מְבֹהָלִים וְנֶחְפָּזִים בְּדַעְתָּן וּמִשְׁתַּגְּעִין בְּיוֹתֵר, כָּל אֵלּוּ בִּכְלַל שׁוֹטִים. וְכֵן מָה שֶׁאָמְרוּ זִכְרוֹנָם לִבְרָכָה (סנהדרין כד ב) אֵיזֶהוּ הַנִּקְרָא רָשָׁע שֶׁפָּסוּל מִן הַתּוֹרָה, וְאֵיזֶהוּ רָשָׁע שֶׁפָּסוּל מִדִּבְרֵיהֶם, כְּגוֹן הָעוֹבֵר עַל גֶּזֶל שֶׁל דִּבְרֵיהֶם, שֶׁהוּא פָּסוּל מִדִּבְרֵיהֶם, וּמִכְּלָלָם הוּא מְשַׂחֵק בְּקֻבְיָא שֶׁאֵין לוֹ אֻמָּנוּת אֶלָּא הוּא, וּמַפְרִיחֵי יוֹנִים בַּיִּשּׁוּב, וּמְגַדְּלֵי בְּהֵמָה דַּקָּה, וְהַחִלּוּק שֶׁהוּא בֵּין פָּסוּל מִדְּאוֹרַיְתָא לְפָסוּל מִדִּבְרֵיהֶם, שֶׁהַפָּסוּל מִן הַתּוֹרָה אָמְרוּ זִכְרוֹנָם לִבְרָכָה (שם כו ב) הֵעִיד, עֵדוּתוֹ בְּטֵלָה אֲפִילּוּ קֹדֶם שֶׁהִכְרִיזוּ עָלָיו, וְהַפָּסוּל מִדְּרַבָּנָן עֵדוּתוֹ קַיֶּמֶת עַד שֶׁיַּכְרִיזוּ עָלָיו, וְאֵיזוֹ תְּשׁוּבָה מַחֲזִירוֹ לְכַשְׁרוּתוֹ, וְהוּא כְּמוֹ שֶׁאָמַר רַב אִידִי בְּפֶרֶק זֶה בּוֹרֵר (סנהדרין כה א) דְּאָמַר רַב אִידִי בַּר אָבִין הֶחָשׁוּד עַל הַטְּרֵפוֹת אֵינוֹ יוֹצֵא מֵחֶזְקָתוֹ עַד שֶׁיֵּלֵךְ לְמָקוֹם שֶׁאֵין מַכִּירִין אוֹתוֹ וְיַחְזִיר אֲבֵדָה בְּדָבָר חָשׁוּב, אוֹ יוֹצִיא טְרֵפָה מִתַּחַת יָדוֹ בְּדָבָר חָשׁוּב וּמִשֶּׁלּוֹ, וּכְמוֹ כֵן נֶאֱמַר בְּחָשׁוּד עַל עֲבֵרָה אַחֶרֶת לְפִי הַדּוֹמֶה, וְיֶתֶר פְּרָטֶיהָ, מְבֹאָרִים שָׁם בְּסַנְהֶדְרִין [פ"א שם]. From the laws of the commandment is that which they, may their memory be blessed, said (Mishneh Torah, Laws of Testimony 9:1) that there are ten [categories] that are disqualified from Torah writ. And they are women, slaves, minors, deaf-mutes, the mentally incapacitated, the blind, evildoers, especially disgraceful people, relatives, those that are invested in their testimony — behold, these are ten. And [those whose sex is unclear] are in the category of women (Mishneh Torah, Laws of Testimony 9:3), one who is half a slave is in the category of slaves and the epileptic is in the category of the mentally incapacitated at the time of his epilepsy. And even not during the time of his epilepsy, the judge must consider whether his mind is confused from the side of the sickness. And so [too,] the very dim-witted that do not understand [when] things contradict one another, and so [too,] people that are impulsive and rash in their thinking and very [unstable] — all of these are in the category of the mentally incapacitated. And so [too,] that which they, may their memory be blessed, said (Sanhedrin 24b) [about] who is the one that is called an evildoer, such that he is disqualified by Torah writ, and who is the evildoer who is disqualified [rabbinically]. And among them is the dice player who does not have any other craft besides it, and the one who flies pigeons in the settlement, and those that raise [sheep and goats]. And the distinction between the [Torah’s] disqualification and the [rabbinic] disqualification, that they, may their memory be blessed, said — that the Torah’s disqualification is that [if] he testified, his testimony is void even before they have proclaimed [his status], but [with] the rabbinic disqualification, his testimony stands until they proclaim [his status]. And what repentance brings him back to his being fit — and it is like Rav Idi said in the chapter [entitled], Zeh Borer (Sanhedrin 25a); as Rav Idi bar Avin said, “One who is suspected of [selling] ‘torn’ animals [has no remedy to restore his fitness to bear witness] until he goes to a locale where they do not recognize him and returns a lost item of substantial value, or removes his own ‘torn’ animal of significant value from his possession” and so [too] is it said similarly about another sin. And the rest of its details are elucidated there in Sanhedrin.
וְנוֹהֶגֶת מִצְוָה זוֹ, בְּכָל מָקוֹם וּבְכָל זְמַן בִּזְכָרִים אֲבָל לֹא בְּנָשִׁים, שֶׁאֵינָן דָּנוֹת שֶׁיִּצְטָרְכוּ לְקַבֵּל עֵדוּת. וְהָעוֹבֵר עָלֶיהָ וְקִבֵּל עֵדוּת אִישׁ רָשָׁע וְעָשָׂה דָּבָר בִּשְׁבִיל עֵדוּתוֹ, עָבַר עַל לָאו, אֲבָל אֵין לוֹקִין עַל לָאו זֶה לְפִי שֶׁאֵין בּוֹ מַעֲשֶׂה. וַאֲפִלּוּ עָשָׂה בּוֹ מַעֲשֶׂה בְּכָל דָּבָר שֶׁבְּמָמוֹן, לְפִי שֶׁנִּתָּן לְהִשָּׁבוֹן אֵין לוֹקִין עָלָיו. And this commandment is practiced in every place and at all times by males, but not by females; since they do not judge, that they should need to accept testimony. And one who transgresses it and accepted the testimony of an evil man and enacted something on account of his testimony has violated a negative commandment. But we do not administer lashes for this negative commandment, as there is no act [involved] with it. And regarding anything that [has to do with] money, even if he does an act, we [still] do not administer lashes, since it is given to return.