The Prophet ﷺ heard a man swearing by his father, so he said, "Do not swear by your fathers. Whoever swears by Allah must speak truthfully, and whoever has an oath sworn to him by Allah must accept it. Whoever does not accept an oath by Allah has no connection with Allah."
سمع النبي ﷺ رجلا يحلف بأبيه فقال: لا تحلفوا بآبائكم، من حلف بالله فليصدق، ومن حلف له بالله فليرض، ومن لم يرض بالله فليس من الله.
Ibn Majah (2101) narrated it from Muhammad bin Ismail bin Samura, who said, Asbat bin Muhammad told us, from Muhammad bin Ajlan, from Nafi, from Ibn Umar, and he mentioned it. Its isnad is hasan because of Muhammad bin Ajlan Madani, for his hadith is hasan. Busiri graded it sahih in his Zawaid.