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:20556Abū Aḥmad al-Mihrajānī > Abū Bakr b. Jaʿfar al-Muzakkī > Muḥammad b. Ibrāhīm > Ibn Bukayr > Mālik > Balaghah > Saʿīd b. al-Musayyib And Sulaymān b. Yasār Suʾilā > a man Julid Hal Tajūz Shahādatuh > Naʿam Idhā Ẓaharat Minh al-Tawbah > Ibn Shihāb > Suʾil > a man Idhā Julid al-Ḥad Hal Tajūz Shahādatuh > Naʿam Idhā Ẓaharat Minh al-Tawbah > Mālik Wadhalik al-Amr ʿIndanā

[Machine] About a man who was whipped, is his testimony permissible? They said, yes, if repentance is shown from him. And from Ibn Shihab, that he was asked about a man, if he is whipped (as punishment), is his testimony permissible? He said, yes, if repentance is shown from him. Malik said, and that is the matter with us. Allah the Almighty said, "Except for those who repent after that and correct themselves. For indeed, Allah is Forgiving and Merciful." [Al Imran 89]. So, if the one who is whipped repents and corrects himself, his testimony is allowed.  

البيهقي:٢٠٥٥٦أَخْبَرَنَا أَبُو أَحْمَدَ الْمِهْرَجَانِيُّ ثنا أَبُو بَكْرِ بْنُ جَعْفَرٍ الْمُزَكِّي ثنا مُحَمَّدُ بْنُ إِبْرَاهِيمَ ثنا ابْنُ بُكَيْرٍ ثنا مَالِكٌ أَنَّهُ بَلَغَهُ أَنَّ سَعِيدَ بْنَ الْمُسَيِّبِ وَسُلَيْمَانَ بْنَ يَسَارٍ سُئِلَا

عَنْ رَجُلٍ جُلِدَ هَلْ تَجُوزُ شَهَادَتُهُ؟ فَقَالَا نَعَمْ إِذَا ظَهَرَتْ مِنْهُ التَّوْبَةُ وَعَنِ ابْنِ شِهَابٍ أَنَّهُ سُئِلَ عَنْ رَجُلٍ إِذَا جُلِدَ الْحَدَّ هَلْ تَجُوزُ شَهَادَتُهُ؟ قَالَ نَعَمْ إِذَا ظَهَرَتْ مِنْهُ التَّوْبَةُ قَالَ مَالِكٌ وَذَلِكَ الْأَمْرُ عِنْدَنَا قَالَ اللهُ تَعَالَى {إِلَّا الَّذِينَ تَابُوا مِنْ بَعْدِ ذَلِكَ وَأَصْلَحُوا فَإِنَّ اللهَ غَفُورٌ رَحِيمٌ} [آل عمران 89] فَإِذَا تَابَ الَّذِي يُجْلَدُ الْحَدَّ وَأَصْلَحَ جَازَتْ شَهَادَتُهُ