Deuteronomy 25:3

New International Reader's Version Bible (NIRV)
But the judge must not give the guilty person more than 40 strokes. If more than that are used, you will have disrespected your Israelite neighbor.

Read Deuteronomy 25:3 in other translations