If You Start Your Period while Fasting, Can You Break It?
Question

I expected that my period would begin the next day, so I intended to fast, but I said: I will fast for Ramadan tomorrow, but if I get my period, I will break the fast. Does making my intention to fast conditional in this way invalidate my fast, or is my fast valid?
Praise be to Allah.Is Intention essential for fasting ?
It is essential to form the firm intention to fast from the night before , because the Prophet (blessings and peace of Allah be upon him) said: “Whoever did not intend to fast before Fajr, there is no fast for him.” (Narrated by Abu Dawud, 2454, At-Tirmidhi, 730 and An-Nasa’i, 2331)
In a version narrated by An-Nasa’i (may Allah have mercy on him) it says: “Whoever did not form the intention to fast the night before, before Fajr, there is no fast for him.” (Classed as authentic by Al-Albani in Sahih Abu Dawud)
If her period starts while fasting, can she break it?
If the woman was not menstruating , and she intended to fast the next day and said, “If I get my period, I will break the fast ,” there is nothing wrong with that, and it does not come under the heading of a conditional intention; rather her intention to fast is a firm intention.
Imam An-Nawawi (may Allah have mercy on him) said: “If a person is hesitant about breaking his fast, or he makes it conditional upon a certain person coming in, and the like, that does not invalidate his fast, according to the view of the majority.” (Rawdat At-Talibin, 1/333)
Imam Abu Al-Qasim Ar-Rafi`i (may Allah have mercy on him) mentions the reason for differentiating between hesitating about interrupting the prayer or making that conditional upon some future event, which renders it invalid, and hesitating about interrupting the fast, which does not affect it. He said:
“If a fasting person is hesitant as to whether he should break his fast or not, or he makes the intention of breaking it conditional upon someone coming in, then Al-Mu`adhdham stated that his fast is not rendered invalid, and that his fast is not spoiled by that.
Ibn As-Sabbagh said in Kitab As-Sawm: Abu Hamid narrated two views concerning this issue.
The difference between fasting and prayer is that the beginning and end of prayer are subject to the intention and choice of the individual, but that does not apply in the case of fasting, because the one who intends at night to fast starts to fast when dawn breaks, and stops fasting when the sun sets, even if he is not aware of them.
As that is the case, the impact of the intention on prayer is greater than the impact of the intention on fasting, hence it is permissible to form the intention before starting to fast, or even after the time of fasting begins, but that is not permissible in the case of prayer. What this means is that prayer consists of certain actions and words, whereas fasting consists of refraining and abstaining, and the intention is more necessary with regard to doing actions than refraining from them.” (Al-`Aziz Sharh Al-Wajiz, 1/466)
Regardless of whether she said that or not, when menses begins it is obligatory to break the fast, so her words are no more than a statement of what she must do.
And Allah knows best.