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 is His slave and Messenger.
If one marries a woman and then finds out that she is not virgin, then there are only two situations for such a person.
a) Before the marriage, he made a condition that the wife should be virgin.
(b) He did not put any such condition before the marriage, but he only assumed so.
In the first situation, according to the view of the majority of Muslim scholars, if she has lost her virginity due to premarital sex, the husband has the right of choice to keep her as a wife or to abandon her. On the other hand, if the virginity was lost due to jumping and the like, then, in this case, the husband has no choice. Since in such an incident, the guardian, and sometimes even the woman, does not know about the loss of virginity.
As for the second condition that he only assumed the virginity of his wife without stipulating being so, then, in this case, he has no choice (to annul the marriage).
Know that the right of the choice to keep the wife or not is valid only before showing any approval to that marriage. If one shows any approval such as continuing to enjoy one's wife after knowing the reason – not being virgin or else – or the wife permits her husband to enjoy her after knowing the defect in her husband by which she has the right of choice, (after showing such approval) no one of them has the choice to leave the other.
However, a husband is not obliged to divorce his wife or to cancel the marriage whether he has the right of choice or not. In addition, keeping martial ties with such a woman, if there is no considerable harm, and neglecting her defects are among the good characteristics.
Allah knows best.