Wa `alaykum as-salamu wa rahmatullahi wa barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Dear sister in Islam, may Allah reward you abundantly for your interest in knowing the teachings of your religion, accept our fasts and righteous deeds, and grant all of us forgiveness by the end of Ramadan.
First and foremost, we’d like to make it clear that the religion of Islam seeks not to cause any hardship to its adherents or burden them beyond their capabilities. Easiness and facilitation among the main characteristics of Islam. Almighty Allah says, ( Allah desireth for you ease; He desireth not hardship for you; and (He desireth) that ye should complete the period, and that ye should magnify Allah for having guided you, and that peradventure ye may be thankful.)( Al-Baqarah 2:185)
This concept of facilitation and easiness in Islam is clearly manifest in its simple and flexible laws. Islam bears into consideration people who have certain excuses, thus easing its rulings in a way that such people will not face any hardship when abiding by Shari`ah precepts. The question in point serves as an example of how Islam seeks facilitation in its laws.
In his response to your question, Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
Your husband who had to take medication for epilepsy falls under the category of the sick. So he did not break any rule, for a sick person is excused from fasting if he cannot avoid taking medication.
So, in this case he need not feel sorry for what he has done; rather he only needs to make up for the day he has missed.
In the future, if he can take the medication before fasting and that would be sufficient and would not interfere with his health, then he can continue fasting. If, however, he must take medication during the day at all times without fail, then it is advisable for him not to fast. In this case he needs to offer fidya by feeding a poor person for every single day of fast he has missed; he does not need to make up for the fast he has missed if his sickness remains with him forever.
Remember, Allah's laws are not intended to impose hardship on us. Allah says, (He wishes to grant you ease and He does not wish to impose hardship on you.) (Al-Hajj 22:78)
The Prophet (peace and blessings be upon him) is reported to have said, “Allah loves His servants to make use of His concessions just as He loves them to carry out His orders.””