The Prophet ﷺ said, "Whoever does not form the intention to fast before dawn has no fast."
أخبرني القاسم بن زكريا بن دينار قال حدثنا سعيد بن شرحبيل قال أنبأنا الليث عن يحيى بن أيوب عن عبد الله بن أبي بكر عن سالم بن عبد الله عن عبد الله بن عمر
عن النبي ﷺ قال من لم يبيت الصيام قبل الفجر فلا صيام له
[Its chain is daif] Ibn Majah reported it in the Book of Fasting, in the chapter on what has been said regarding the obligation of fasting from the night onward, hadith no. 1700, through the hadith of Abdullah bin Abu Bakr with this wording, but he did not hear it from Salim. See the following hadith. It is also found in Kubra, hadith no. 2640.