The Prophet ﷺ said, "If any of you breaks his ablution during prayer, let him hold his nose and then leave."
حدثنا إبراهيم بن الحسن المصيصي حدثنا حجاج حدثنا ابن جريج أخبرني هشام بن عروة عن عروة
قال النبي ﷺ إذا أحدث أحدكم في صلاته فليأخذ بأنفه ثم لينصرف
[Sahih]. Ibn Majah reported it in "Establishing the prayers," the chapter on how one should turn away, hadith 1222, from the hadith of Hisham bin Urwa through this chain. Ibn Khuzayma graded it sahih, hadith 1019, as did Ibn Hibban, hadith 205, 206, and Hakim according to the criteria of the two Shaykhs, 1/184, 260, and Dhahabi agreed with him.