Positive commandment · Mitzvat Aseh #178 of 613
For anyone who has evidence to testify in court
להעיד בבית דין למי שיש לו עדות
The verse · Vayikra 5:1
וְנֶפֶשׁ כִּי־תֶחֱטָא וְשָׁמְעָה קוֹל אָלָה וְהוּא עֵד אוֹ רָאָה אוֹ יָדָע אִם־לוֹא יַגִּיד וְנָשָׂא עֲוֺנוֹ
“And if a person sin, and hear the voice of adjuration, and is a witness, whether he has seen or known of it; if he do not utter it, then he shall bear his iniquity.”
The Rambam’s words
For anyone who has evidence to testify in court, as [Leviticus 5:1] states: "If he was a witness, saw, or knew...."
להעיד בבית דין למי שיש לו עדות, שנאמר: "והוא עד, או ראה או ידע" (ויקרא ה,א).
Why · Sefer HaChinuch #122
Testimony
“It is from the roots of the commandment [that it is] because there is great benefit to people with this commandment. It is not necessary to write at length about it, as the things are known to all who see the sun.”
Who & when
“And [it] is practiced in every place and at all times by males, but not by women — as women are not in the category of testimony due to the weakness of their minds.”
Where in the Mishneh Torah
Hilchot Testimony הלכות עדות