If you accidentally swallow toothpaste or water while brushing your teeth during fasting, your fast may be broken. However, you can continue to fast and make up the missed day after Ramadan.