Your fast is valid, and the fact that you vomited does not matter, because if a person vomits unintentionally and without meaning to do so, his fast is still valid. But the one who vomits intentionally has broken his fast, because of the report narrated by al-Tirmidhi (720) from Abu Hurayrah (may Allaah be pleased with him), that the Prophet (peace and blessings of Allaah be upon him) said: “The one who cannot help vomiting does not have to make up the fast, but the one who vomits deliberately has to make it up.” Classed as saheeh by al-Albaani in Saheeh al-Tirmidhi.
Ibn Qudaamah (may Allaah have mercy on him) said in al-Mughni (3/23): The one who makes himself vomit has to make up (the fast), but the one who cannot help vomiting does not have to do anything.
What is meant by making oneself vomit is vomiting deliberately, and what is meant by “cannot help vomiting” is when it happens involuntarily. The one who makes himself vomit has to make up the fast because his fast has been spoiled, but the one who cannot help it does not have to do anything. This is the view of the majority of scholars. Al-Khattaabi said: I do not know of any difference of opinion among the scholars. End quote.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was asked about vomiting in Ramadaan – does it break the fast?
He replied: If a person vomits deliberately then it breaks the fast, but if he vomits unintentionally then it does not break the fast. The evidence for that is the hadeeth of Abu Hurayrah (may Allaah be pleased with him) … and he quoted the hadeeth that we have quoted above.
If you could not help vomiting, then you did not break the fast. If a person feels that his stomach is queasy and that its contents will be expelled, do we say that you have to try to stop it? No. Or that you have to make it happen? No. Rather we say: Take a middle approach – do not make yourself vomit and do not try to stop it, because if you make yourself vomit you will break the fast, but if you try to stop it, that will harm you. So leave it, and if it comes out without any action on your part, then it will not matter and that will not break your fast. End quote from Fataawa al-Siyaam, p. 231.