Deuteronomy 25:3

Even so, these shall not exceed the number of forty. Otherwise, your brother may depart, having been wounded shamefully before your eyes

Other versions

King James Version

Forty stripes he may give him, and not exceed: lest, if he should exceed, and beat him above these with many stripes, then thy brother should seem vile unto thee.

English Standard Version

Forty stripes may be given him, but not more, lest, if one should go on to beat him with more stripes than these, your brother be degraded in your sight.

New International Version

but he must not give him more than forty lashes. If he is flogged more than that, your brother will be degraded in your eyes.