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.
muslim:1473bYaḥyá b. Bishr al-Ḥarīrī > Muʿāwiyah / Ibn Salāam > Yaḥyá b. Abū Kathīr > Yaʿlá b. Ḥakīm > Saʿīd b. Jubayr > Ibn ʿAbbās > Idhā Ḥarram al-a man ʿAlayh Āmraʾatah Fah Yamīn Yukaffiruhā

When a man declares his wife unlawful for himself that is an oath which must be atoned, and he said: There is in the Messenger of Allah ﷺ a noble pattern for you.  

مسلم:١٤٧٣bحَدَّثَنَا يَحْيَى بْنُ بِشْرٍ الْحَرِيرِيُّ حَدَّثَنَا مُعَاوِيَةُ يَعْنِي ابْنَ سَلاَّمٍ عَنْ يَحْيَى بْنِ أَبِي كَثِيرٍ أَنَّ يَعْلَى بْنَ حَكِيمٍ أَخْبَرَهُ أَنَّ سَعِيدَ بْنَ جُبَيْرٍ أَخْبَرَهُ أَنَّهُ سَمِعَ ابْنَ عَبَّاسٍ قَالَ

إِذَا حَرَّمَ الرَّجُلُ عَلَيْهِ امْرَأَتَهُ فَهْىَ يَمِينٌ يُكَفِّرُهَا وَقَالَ { لَقَدْ كَانَ لَكُمْ فِي رَسُولِ اللَّهِ أُسْوَةٌ حَسَنَةٌ}  


See similar narrations below:

Collected by Muslim
muslim:1473aZuhayr b. Ḥarb > Ismāʿīl b. Ibrāhīm > Hishām / al-Dastawāʾī > Katab Ila Yaḥyá b. Abū Kathīr > Yaʿlá b. Ḥakīm > Saʿīd b. Jubayr > Ibn ʿAbbās > Kān

Verily, there is in the Messenger of Allah ﷺ a model pattern for you.  

مسلم:١٤٧٣aوَحَدَّثَنَا زُهَيْرُ بْنُ حَرْبٍ حَدَّثَنَا إِسْمَاعِيلُ بْنُ إِبْرَاهِيمَ عَنْ هِشَامٍ يَعْنِي الدَّسْتَوَائِيَّ قَالَ كَتَبَ إِلَىَّ يَحْيَى بْنُ أَبِي كَثِيرٍ يُحَدِّثُ عَنْ يَعْلَى بْنِ حَكِيمٍ عَنْ سَعِيدِ بْنِ جُبَيْرٍ عَنِ ابْنِ عَبَّاسٍ

أَنَّهُ كَانَ يَقُولُ فِي الْحَرَامِ يَمِينٌ يُكَفِّرُهَا وَقَالَ ابْنُ عَبَّاسٍ { لَقَدْ كَانَ لَكُمْ فِي رَسُولِ اللَّهِ أُسْوَةٌ حَسَنَةٌ}