Deuteronomy 25
1 Ref If there is an argument between men and they go to law with one another, let the judges give their decision for the upright, and against the wrongdoer.
2 Ref And if the wrongdoer is to undergo punishment by whipping, the judge will give orders for him to go down on his face and be whipped before him, the number of the blows being in relation to his crime.
3 Ref He may be given forty blows, not more; for if more are given, your brother may be shamed before you.