Jundab reported,

He heard him say, "I attended the Eid al-Adha prayer with the Messenger of Allah ﷺ. Some people had slaughtered their sacrifices before the prayer, so the Prophet ﷺ said, 'Whoever among you slaughtered before the prayer must repeat his sacrifice, and whoever has not yet slaughtered should do so in the name of Allah.'"

Ibn Majah 3152

Sahih

حدثنا هشام بن عمار حدثنا سفيان بن عيينة عن الأسود ابن قيس

عن جندب البجلي

أنه سمعه يقول شهدت الأضحى مع رسول الله ﷺ فذبح أناس قبل الصلاة فقال النبي ﷺ من كان ذبح منكم قبل الصلاة فليعد أضحيته ومن لا فليذبح على اسم الله

ابن ماجه 3152صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Sacrificial animals
Chapter
Prohibition of slaughtering the udhiya before the prayer
Numbering
Darussalam 3152
Ibn Majah 3152