Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:17140ʿAbdullāh b. Dhakwān Abū al-Zinād > ʿAbdullāh b. ʿĀmir b. Rabīʿah > Laqad Adrakt

[Machine] I reached Abu Bakr, Umar, Uthman, and those who came after them from the caliphs, and I did not see them striking the slave except forty times. Abu Bakr al-Ardistani informed us, Abu Nasr al-Iraqi narrated to us, Sufyan al-Jawhari narrated to us, Ali ibn al-Hasan narrated to us, Abdullah ibn al-Walid narrated to us, Sufyan mentioned it, and from Sufyan, Ja'far narrated from his father that Ali used to not strike the slave except forty times when he threw free slaves.  

البيهقي:١٧١٤٠وَرَوَاهُ الثَّوْرِيُّ عَنْ عَبْدِ اللهِ بْنِ ذَكْوَانَ أَبِي الزِّنَادِ حَدَّثَنِي عَبْدُ اللهِ بْنُ عَامِرِ بْنِ رَبِيعَةَ قَالَ لَقَدْ

أَدْرَكْتُ أَبَا بَكْرٍ وَعُمَرَ وَعُثْمَانَ ؓ وَمَنْ بَعْدَهُمْ مِنَ الْخُلَفَاءِ فَلَمْ أَرَهُمْ يَضْرِبُونَ الْمَمْلُوكَ فِي الْقَذْفِ إِلَّا أَرْبَعِينَ أَخْبَرَنَاهُ أَبُو بَكْرٍ الْأَرْدَسْتَانِيُّ أنبأ أَبُو نَصْرٍ الْعِرَاقِيُّ ثنا سُفْيَانُ الْجَوْهَرِيُّ ثنا عَلِيُّ بْنُ الْحَسَنِ ثنا عَبْدُ اللهِ بْنُ الْوَلِيدِ ثنا سُفْيَانُ فَذَكَرَهُ وَعَنْ سُفْيَانَ ثنا جَعْفَرٌ عَنْ أَبِيهِ أَنَّ عَلِيًّا ؓ كَانَ لَا يَضْرِبُ الْمَمْلُوكَ إِذَا قَذَفَ حُرًّا إِلَّا أَرْبَعِينَ