It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: If any one of you spits in the mosque, he should bury it; if he does not do so, then he should spit into his garment.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 7531
Hadith Gradingحکم دارالسلام:حديث صحيح، وإسناده حسن خ: 416، م: 550.