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, sallallaahu ʻalayhi wa sallam, is His slave and Messenger.
It is preferable not to write the names of the honorable Companions on clothes, as they get stained with sweat. Some scholars held that it is disliked to treat the names of the Companions and the righteous predecessors with disrespect. Ibn Al-Haaj after underlining the prohibition of disrespecting the names of Allah and the names of His Messengers, wrote, “It is disliked to show disrespect towards it if it contains the names of the scholars, righteous predecessors, or the Islamic fields of knowledge...” [Al-Madkhal]
Allah knows best.