1,361. Completing a Fast

Hilchos Taaniyos 1:14 Whenever one is fasting, be it because of personal problems, a disturbing dream or communal troubles, he should not indulge in pleasure, act frivolously, or be cheerful and chipper. Rather, he should be serious, like a person in mourning, as we see from Eicha 3:39, “For what should a living person be concerned? Each one for his sins.” One who is fasting may taste even a reviis of food (about 3 ounces) so long as he spits it out without swallowing. If one forgets and eats, he must still complete his fast.

Hilchos Taaniyos 1:15

If someone was fasting for a sick person and the patient recovered, or if he was fasting for some problem that is resolved, he must still complete his fast. If a person travels from a place where they are fasting to a place where they are not, he must complete his fast. If one travels from a place where they are not fasting to a place where they are, he should fast with them. If he forgot and ate, he should not do so where they can see him and he should not indulge himself with pleasures.