The Messenger of Allah ﷺ said, "No one is to be given more than ten lashes except for a punishment prescribed by Allah."
حدثنا قتيبة حدثنا الليث عن يزيد بن أبي حبيب عن بكير بن عبد الله بن الأشج عن سليمان بن يسار عن عبد الرحمن بن جابر بن عبد الله
قال رسول الله ﷺ لا يجلد فوق عشر جلدات إلا في حد من حدود الله
Agreed upon [by Bukhari and Muslim]. Bukhari related it in the Book of Punishments, chapter on how much discretionary punishment and disciplinary chastisement may be given, no. 6848, from Ashaj, through the hadith of Layth bin Saad. Muslim related it, no. 1708, through the hadith of Bukayr bin Abdullah.