Yes, it is illegal to make your child go through a virginity test to see if they are still a virgin. It is unlawful and offensive to subjugate the bodily integrity of women. It is seen as a form of sexual assault. I understand parents believe they have their child's welfare at heart doing so but do they consider the emotional trauma that follows. Virginity is not only lost when someone have sex. Hymen can be broken by exercise and accident and some girls are not even born with a hymen. Imagine such a girl having to explain to her father who just found out she is not a virgin that she has never had sex.
The International Rehabilitation Centre for Torture victims describes it as a "gross violation of women's rights and one that may amount to ill-treatment and torture under international law." It is simply a form of discrimination against the female gender. In some part of Africa, newly we'd brides are subjugated to this inhumane torture but I'm glad there is a movement to ban it in some African countries, thanks to westernization and education.
Parents should be able to trust their daughters and not give them the stigma of their lives by forcing them go through this.