On the Day of Sacrifice, the Messenger of Allah ﷺ said, "Whoever slaughtered before the prayer must repeat the sacrifice."A man stood up and said, "Messenger of Allah, this is a day on which meat is desired." He then mentioned the difficult circumstances of some of his neighbors, and the Messenger of Allah ﷺ seemed to accept what he said.The man said, "I have a young goat that is dearer to me than two sheep of meat."The Messenger of Allah ﷺ permitted him to sacrifice it, but I do not know whether this concession extended to anyone else or not. Then he turned to two rams and slaughtered them.
أخبرنا يعقوب بن إبراهيم قال حدثنا ابن علية قال حدثنا أيوب عن محمد
قال رسول الله ﷺ يوم النحر من كان ذبح قبل الصلاة فليعد فقام رجل فقال يا رسول الله هذا يوم يشتهى فيه اللحم فذكر هنة من جيرانه كأن رسول الله ﷺ صدقه قال عندي جذعة هي أحب إلي من شاتي لحم فرخص له فلا أدري أبلغت رخصته من سواه أم لا ثم انكفأ إلى كبشين فذبحهما
Bukhari narrated it in "Eidayn," the chapter "Eating on the Day of Sacrifice," hadith 954, and Muslim in "Adahi," the chapter "Its Time," hadith 1962, from the hadith of Ismail bin Ulaya, with the same chain. It is also found in Al-Kubra, hadith 4488.