What are the obligation of fasting in islam? What is the obligatory condition of fasting? What is the obligation during ramadan?
Fasting in Ramadan is one of the five pillars of Islam. The proofs on which it is based are the Qur’an, sunnah, and the consensus of Muslim jurists.
Allah Almighty says: “O you who believe! Fasting is prescribed to you as it was prescribed to those before you, that you may (learn) self-restraint, (Fasting) for a fixed number of days; but if any of you is ill, or on a journey, the prescribed number (should be made up) from days later. For those who can do it (with hardship), is a ransom, the feeding of one that is indigent. But he that will give more, of his own free will, it is better for him. And it is better for you that ye fast, if ye only knew.”, “…So every one of you who is present (at his home) during Ramadan should spend it in fasting…”, and “…and eat and drink, until the white thread of dawn appears to you distinct from its black thread; then complete your fast till the night appears…”
Fasting is one of the five pillars of Islam. These are listed in the hadith as follows: “Islam is based upon five: the testimony of Lā ilāha illallāh, and that Muhammad is the Messenger of Allah, the establishment of the ritual prayer, giving the zakāt, fasting (the month of) Ramadan, and performing Hajj to the House of Allah upon those who can afford it.”
According to the narration from Talha ibn Ubaydullāh (ra), a bedouin with unkempt hair came to Allah’s Messenger (saw) and said,
“O Allah’s Messenger (saw)! Inform me what Allah has made compulsory for me as regards the prayers.”
“You have to offer perfectly the five compulsory prayers in a day and night (24 hours) unless you want to pray nawāfil.”
The bedouin further asked,
“Inform me what Allah has made compulsory for me regarding fasting.”
“You have to fast during the whole month of Ramadan unless you want to fast more as nawāfil.”
The bedouin further asked,
“Tell me how much zakāt Allah has enjoined on me.”
Thus, Allah’s Messenger (saw) informed him about all the rules (i.e. fundamentals) of Islam.
The bedouin then said,
“By Him Who has honored you, I will neither perform any nawāfil nor will I decrease what Allah has enjoined on me.
Allah’s Messenger (saw) said, “If he is saying the truth, he will succeed (or he will be granted Paradise).”
Muslim jurists are unanimous on the obligation of fasting in the month of Ramadan.
 Al-Baqara, 2: 183-184.  Al-Baqara, 2: 185.  Al-Baqara, 2: 187.  Al-Bukhari, Imān, 34, 40, ʿIlm, 25; Muslim, Imān, 19-22; al-Tirmidhī, Imān, 3; al-Nasā’ī, Imān, 13.  Al-Bukhari, Imān, 34, Ṣawm, 1, Hiyal, 3; Muslim, Imãn, 8; Abū Dawūd, Ṣalāh, 1; al-Tirmidhī, Zakāt, 2.
Source: Basic Islamic Principles (ilmiḥal) According to the Four Sunni Schools With Evidence From The Sources of Islamic Law, Prof. Hamdi Döndüren, Erkam Publications