This is a Detested Act
Question :
There is a widespread practice among some of the people in the Arab country of Morocco, which is that the mother cuts her daughter with a shaving razor above the knee, making three lines close together. When the blood flows out, she places a small amount of sugar on it, then she orders her daughter to eat it and to say certain words, believing that this deed will preserve her daughter's virginity and prevent any transgressor from taking it (and there are other ways of performing this act). What is the ruling of the Islamic Law on this act?
Answer:
This act is detestable and it is a superstition which is not permissible to perform; indeed, it must be abandoned and avoided. And the view that it preserves the girl's virginity is a false one from the inspiration of Satan, and there is no basis for it in the purified Islamic Law. People must be advised to abandon it, and to avoid doing it, and the scholars must explain that and warn people against it, because they are the conveyors of Allah's Message Most Glorified be He and that of His Messenger. And Allah is the One Who is asked.
Source:
Ibn Baz
Fatawa Islamiyah, Vol. 5 Pages 442-443