All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
The act of Tasfeeh (i.e. keeping the girl’s virginity through magic until she marries), is considered among the forbidden acts as it involves magic. Indeed, the family of the girl are obliged by the Sharee’ah to protect her from any harassment. This protection is not only peculiar to the issue of virginity; rather, it is more important to protect the girls’ morals, urge them to be chaste and warn them against mixing with non-Mahram men or keeping company with dissolute women.
However, you should not assume that you are affected with such magic unless you predominantly think that you are really affected because of the appearance of some of its symptoms as clarified in Fatwa 13199, in which case you may get rid of it by performing Ruqyah. For more benefit on how to treat magic, please refer to Fataawa 85500, 85918 and 91106.
Allaah Knows best.