Sahih al-Bukhari Book 86, Hadith 71
On the authority of others, that the Prophet (ﷺ) said, "No Punishment exceeds the flogging of the ten
stripes, except if one is guilty of a crime necessitating a legal punishment prescribed by Allah."
The Prophet (ﷺ) used to say, "Nobody should be flogged more than ten stripes except if he is guilty of a crime, the legal punishment of which is assigned by Allah."
I heard the Prophet (ﷺ) saying, "Do not flog anyone more than ten stripes except if he is involved in a crime necessitating Allah's legal Punishment."