The believer is enjoined to do wudoo’ properly. This was the command of the Prophet (peace and blessings of Allaah be upon him) who said: “Do wudoo’ properly, make water reach between the fingers and toes, and rinse the nose very thoroughly, except when you are fasting.” (Narrated by al-Tirmidhi, al-Sawm, 788; Abu Dawood, 142; classed as saheeh by al-Albaani in Saheeh Sunan al-Tirmidhi, 631).
So he (peace and blessings of Allaah be upon him) pointed out that we should avoid excessive rinsing of the mouth and nose when fasting, lest that lead to the thing which is forbidden, namely water getting into the throat whilst fasting. As for simply rinsing out the mouth whilst fasting, there is nothing wrong with that so long as the water does not enter the throat of the fasting person.
Hence it was narrated in a saheeh hadeeth that ‘Umar ibn al-Khattaab said: “I kissed (my wife) whilst I was fasting. I said, ‘O Messenger of Allaah, today I did something grievous, I kissed whilst I was fasting.’ He said, ‘What do you think about rinsing your mouth whilst you are fasting?’ I said, ‘There is nothing wrong with it.’ He said, ‘Then what’s wrong?.’”
(Narrated by Abu Dawood, al-Sawm, 2037; classed as saheeh by al-Albaani in Saheeh Sunan Abi Dawood, no. 2089).
The commentator on this hadeeth said concerning the words, “What do you think about rinsing your mouth whilst you are fasting?”, This is a sign of brilliant understanding, for rinsing the mouth does not invalidate the fast and it is the first step towards drinking… And Allaah knows best.