What is the ruling on fasting?
Fasting in Ramadan is an individual obligation (Fard ‘Ayn) upon every mature, sane Muslim who is capable of fasting.
Fasting can also be recommended (Mustahabb), such as voluntary fasting on Mondays and Thursdays, fasting on the Day of Arafah for those not performing Hajj, and fasting on Ashura.
Fasting can be prohibited (Haram), such as fasting on the two Eid days, the Day of Doubt (Yawm al-Shakk), and the Days of Tashreeq.
Some types of fasting are disliked (Makruh), such as singling out Friday or Saturday for fasting without a specific reason and fasting on the Day of Arafah for a pilgrim.
Is a person rewarded for refraining from all that breaks their fast when required to do so, and is it considered a valid fast?
If a person eats or drinks thinking that Fajr has not yet arrived, but then someone informs them that Fajr had already begun, they must refrain from eating for the rest of the day and make up the fast later.
If they observe the required restraint (imsak), they will be rewarded for obeying the command because fulfilling an obligation brings reward.
However, this is not considered a valid fast in terms of rulings. For example:
● It is not disliked (makruh) for them to use a miswak after noon.
● They are not encouraged to hasten the breaking of the fast at sunset.
● Other fasting-related rulings do not apply to them.
What do you say about someone who stays up all night on Laylat al-Qadr but misses Fajr prayer?
Such a person has deprived themselves of a great reward. Performing obligatory acts is more beloved to Allah than voluntary acts. Fajr prayer is an obligation, and performing it in congregation is equivalent to worshiping for the entire night. So how can someone neglect it while striving for voluntary prayers?!
Which is better during the day in Ramadan: reciting the Quran or performing voluntary prayers?
A Muslim should establish a daily schedule for reciting the Quran in Ramadan.
Once they have completed their daily portion (known as a wird or hizb), they can engage in other acts of worship, including voluntary prayers (nawafil). Prayer itself is called "Quran", because a significant part of it involves reciting the Quran.
Allah says: "BE CONSTANT in [thy] prayer from the time when the sun has passed its zenith till the darkness of night, and [be ever mindful of its] recitation at dawn: for, behold, the recitation [of prayer] at dawn is indeed witnessed [by all that is holy]." [Al-Isra`/78]