All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
There is no mention of that specific case in the rulings pertaining to engagement in Islam. However, the religiosity and good character are the criteria to be considered (for choosing a potential spouse) as per the Sharee'ah. Please refer to Fataawa 84221 and 85573.
This should not be a reason for canceling the marriage and revoking the engagement. Allaah, The Exalted, will hopefully confer blessings upon such a marriage and provide the spouses with righteous children who would be the source of happiness for their parents in this worldly life and the Hereafter. We know of no special reward for the person who chooses to carry on with such a marriage when the other spouse suffers a certain defect. However, we are hopeful that he would be generously rewarded for that if such an act was accompanied by a sincere intention as it involves solacing an afflicted person and maintaining patience and self-discipline.
However, if the person does not feel comfortable with carrying on with the marriage in this case, there is no harm in canceling the engagement. It should be noted that engagement in Islam is nothing but a promise of marriage and any of the two parties has the right to revoke it whenever he or she wishes. However, it is disliked to revoke the engagement for no (valid) reason. For more benefit, kindly refer to Fataawa 87444 and 89197.
Allaah Knows best.