Al-Sha'bi (may Allah have mercy on him) said: "That is when he has consummated the marriage with her." He said: "And if he learns of that before he consummates the marriage with her, then if he wishes he may keep her, and if he wishes he may separate from her without divorce."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 14230