All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
If vomit came out suddenly without you intending to bring it out, and you did not swallow any of it, then your fast is valid, and you are not required to do anything. The Prophet said: “Whoever intentionally vomits, must make up. However, if one is overcome by vomit, then he does not have to make up.” [At-Tirmithi, Ibn Maajah and Abu Daawood]
Ibn Qudaamah said in his book Al-Mughni: “The word “intentionally” means forcing oneself to vomit, while “overcome” is when vomit comes out without his choice or control.
Therefore, if one intentionally vomits then he must make up because his fast is invalidated by this, but when one is overcome by vomit then he does not have to make up. This is the view of the majority of the scholars. Al-Khattaabi said: ‘I do not know of any disagreement amongst the scholars concerning this issue’.” [End of quote]
Allah knows best.