The Messenger of Allah ﷺ said, "When one of you is invited to a wedding feast, let him attend."
حدثنا القعنبي عن مالك عن نافع
أن رسول الله ﷺ قال إذا دعي أحدكم إلى الوليمة فليأتها
It was narrated by Bukhari, in the Book of Marriage, Chapter on the Right to Accept an Invitation to a Wedding Feast and Other Invitations etc., no. 5173, and Muslim, in the Book of Marriage, Chapter on the Command to Accept an Invitation to a Feast, no. 1429, from the hadith of Malik through this route, and it is in the Muwatta (Yahya's version), 2/546.