Does merely loving a girl without a future marriage contract or engagement with her invalidate the fast of Ramadan?
All perfect praise be to Allah, the Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His Slave and Messenger.
The mentioned love does not invalidate the fast, as long as it does not lead to an act that invalidates the fast such as ejaculation. Nevertheless, it is a prohibited relationship and disobedience to Allah The Almighty, particularly during the month of Ramadan. Moreover, this relationship decreases or even annihilates the reward of the fasting person, because the Prophet said: “If one does not eschew lies and false conduct, Allah would be in no need for his abstinence from food and drink.” [Al-Bukhari]
Committing prohibitions during the fast makes it fruitless and worthy of no reward. Little wonder, as whoever leaves lawful food and drink to commit prohibited acts deserves to have his worship rejected. The fast is not legislated just for hunger and thirst in and of themselves, but for the resulting weakness of the evil desires and subjecting the soul that persistently enjoins evil to the reassured one. The fast also aims at achieving piety, and without it the fast will not be accepted and will be of no benefit. The Prophet said: “Perhaps a fasting person will get nothing for his fast save hunger and thirst.” [Ahmad and Ibn Maajah]
Allah Knows best.