The Prophet ﷺ said, "Whoever does not form the intention to fast before dawn, his fast is not valid."
حدثنا إسحق بن منصور أخبرنا ابن أبي مريم أخبرنا يحيى بن أيوب عن عبد الله بن أبي بكر عن ابن شهاب عن سالم بن عبد الله عن أبيه
عن النبي ﷺ قال من لم يجمع الصيام قبل الفجر فلا صيام له
[Its chain of transmission is daif]. Abu Dawud narrated it in the Book of Fasting, chapter on making the intention for fasting, hadith 2454, from Yahya bin Ayub through the same route, and Ibn Khuzayma graded it sahih, hadith 1933. Zuhri narrated it using "an" without specifying direct transmission. The reports attributed to Hafsa and Ibn Umar as their own statements were narrated by Nasai, hadith 2338 and 2344, and others, with sahih chains of transmission.