أَخْبَرَنَا أَبُو أَحْمَدَ الْمِهْرَجَانِيُّ، ثنا أَبُو بَكْرِ بْنُ جَعْفَرٍ الْمُزَكِّي، ثنا مُحَمَّدُ بْنُ إِبْرَاهِيمَ، ثنا ابْنُ بُكَيْرٍ، ثنا مَالِكٌ، أَنَّهُ بَلَغَهُ أَنَّ سَعِيدَ بْنَ الْمُسَيِّبِ، وَسُلَيْمَانَ بْنَ يَسَارٍ، سُئِلَا عَنْ رَجُلٍ جُلِدَ، هَلْ تَجُوزُ شَهَادَتُهُ؟ فَقَالَا: نَعَمْ، إِذَا ظَهَرَتْ مِنْهُ التَّوْبَةُ، وَعَنِ ابْنِ شِهَابٍ أَنَّهُ سُئِلَ عَنْ رَجُلٍ إِذَا جُلِدَ الْحَدَّ، هَلْ تَجُوزُ شَهَادَتُهُ؟ قَالَ: نَعَمْ، إِذَا ظَهَرَتْ مِنْهُ التَّوْبَةُ. قَالَ مَالِكٌ: " وَذَلِكَ الْأَمْرُ عِنْدَنَا، قَالَ اللهُ تَعَالَى: {إِلَّا الَّذِينَ تَابُوا مِنْ بَعْدِ ذَلِكَ وَأَصْلَحُوا فَإِنَّ اللهَ غَفُورٌ رَحِيمٌ} [آل عمران: ٨٩] فَإِذَا تَابَ الَّذِي يُجْلَدُ الْحَدَّ وَأَصْلَحَ، جَازَتْ شَهَادَتُهُ ".
It reached Malik that Sa'id bin al-Musayyib and Sulayman bin Yasar (may Allah have mercy on them) were asked about a man who had been given the hadd punishment: is his testimony permissible? They said: Yes, if his repentance becomes evident. And Ibn Shihab was asked about a man who has been given the hadd punishment by flogging: is his testimony permissible? He said: Yes, if his repentance becomes evident.
Imam Malik (may Allah have mercy on him) said: This is the position with us: "Except those who repent after that and reform, then Allah is Most Forgiving, Most Merciful" [Surah Al Imran: 89]. If the one who has been given the hadd punishment repents, his testimony is acceptable.