The World Federation One Stop Fiqh

Ruling 1712

If a person is certain or confident that fasting will cause him significant harm or he deems this probable, and the probability creates fear in him, in the event that his deeming it probable would be considered by rational people to be reasonable, it is not obligatory on him to fast. In fact, if that harm would result in him dying or losing a limb, then fasting is unlawful; otherwise, if he fasts with the intention of rajāʾand afterwards he realises that it did not cause him any significant harm, his fast is valid.