I saw a man come to Ibn Umar and ask him a question. He said that he had vowed to fast every Wednesday, but one such Wednesday fell on the Day of Sacrifice or the Day of Fitr.Ibn Umar replied, "Allah has commanded the fulfillment of vows, and the Messenger of Allah ﷺ has forbidden us from fasting on the Day of Sacrifice."
حدثنا هشيم أخبرنا يونس
رأيت رجلا جاء ابن عمر فسأله فقال إنه نذر أن يصوم كل يوم أربعاء فأتى ذلك على يوم أضحى أو فطر فقال ابن عمر رضي الله عنه أمر الله بوفاء النذر ونهانا رسول الله ﷺ عن صوم يوم النحر
Its chain of transmission is sahih. Yunus is Ibn Ubayd. Ziyad bin Jubayr bin Hayyah was a trustworthy successor (tabii), whose reliability was affirmed by Ahmad, Ibn Main, Nasai, and others, and Bukhari gave his biography in al-Kabir, 2/1/317. The hadith was narrated by Bukhari, 4:209-210, and Muslim, 314, both through the route of Ziyad bin Jubayr.The commentators have gone to great lengths here, as is their custom in splitting hairs over wordings and exploring possible interpretations, claiming that Ibn Umar withheld from giving a ruling because of a conflict between the evidences (see for example al-Fath, 4:210, and Nawawi's commentary on Muslim, 8:6). But in our view, this was not Ibn Umar's intent. Rather, he wanted to teach the questioner the ruling and the reasoning behind the fatwa, and to convey to him the evidences on which the ruling rested. So he informed him that fulfilling a vow is obligatory, and that fasting on the day of Eid is forbidden, so that the questioner would understand that a fast which Allah has prohibited and forbidden, if a person performs it, is an invalid fast. This is because it is an act of worship performed in a manner that Allah has forbidden, transgressing the limits set by Allah in doing so. And obligating oneself through a specific vow does not lift the prohibition brought by the Messenger, so this vow falls away from him, as though he had vowed to fast every Wednesday within the limits that Allah has permitted, since he did not intend to vow to fast this particular day whose fasting is forbidden.Rather, if he does vow that, his vow is invalid, and he is sinful, since he vowed to commit a transgression. This is clear and evident.