Praise be to Allah.
In the answer to question no. 158489 we stated that epilepsy is one of the defects for which the marriage may be annulled. So it is permissible for either the husband or the wife to annul the marriage, if it becomes clear to him or her that the other partner has the defect of epilepsy. If the husband finds out after doing the marriage contract that the woman has epilepsy, and he annuls the marriage because of that defect, and that happens before consummation of the marriage, then the woman is not entitled to any part of the mahr.
Ibn Qudaamah (may Allah have mercy on him) said: If annulment occurs before consummation of the marriage, then she is not entitled to any mahr from him, whether annulment was initiated by the husband or the wife. This is the view of ash-Shaafa‘i. The reason for that is that if the annulment comes from her, then the separation comes about on her initiative, so the mahr is waived. If it comes from him, then he has only annulled the marriage because of a defect in her that she deceived him about by concealing it, so it is as if the annulment came from her.
End quote from al-Mughni, 7/144
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said: The words “if annulment occurs before consummation of the marriage, then she is not entitled to any mahr” mean: if annulment occurs before consummation of the marriage, then there is no mahr for the wife, whether the defect was in him or in her.
But if the defect was in her, then it is clear that she is not entitled to any mahr. For example: a man did the marriage contract with a woman, then before consummating the marriage with her, it became apparent that there was a defect in her, so he annulled the marriage. In this case she is not entitled to any mahr, because she deceived him; she is the one who deceived the husband.
If the defect is in the husband, and she annulled the marriage because of the husband’s defect, then the author says: she is not entitled to any mahr, because the separation came about on her initiative, as she is the one who asked for annulment.
The correct view concerning this matter is that if the defect is in the husband and he annulled the marriage before consummation, then she is entitled to half of the mahr, because the husband is the cause of annulment. So how can we deal with this deceitful man in a manner that serves his interests?
They say that the separation came about on her initiative, because she is the one who asked for annulment. However, we say: she did not ask for annulment because she changed her mind or because that served her interests; rather it was because of his defect. So in fact, he is the one who deceived her, and she is saying: I wanted to marry this husband, but so long as he has this defect, I cannot stay with him. Now, in reality, the separation is because of him. According to the scholars, in any case where the separation is due to the husband, then the woman is entitled to half of the mahr.
End quote from ash-Sharh al-Mumti‘, 12/227-228
To sum up: if a man finds a defect in his wife that causes him to miss out on any of the purposes of marriage, such as epilepsy – for example – then he has the right to request annulment of the marriage. If annulment occurs before consummation, then the woman is not entitled to anything, because the annulment only came about because of her.
And Allah knows best.