Wa `alaykum As-Salamu wa Rahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1- It isn’t permissible for spouses to make not having children a condition in the marriage contract because it contradicts the objectives for which the contract was legislated.
2- If they were afraid of diseases, we tell them, thanks to Allah, medicine is so advanced that it can overcome such diseases.
Answering your question, the General Iftaa’ Department in Jordan, states the following:
Marriage is a blessed contract legislated by Allah for its great objectives upon which people’s interests rest.
In fact, giving birth to many children is essential to the continuity of mankind, and this can’t be achieved save by marriage.
In addition, a person is rewarded for getting married because by doing so he pleases Allah and wins the love of His Prophet (peace be upon him) who urged Muslims to have children as he said: “Marry the one who is fertile and loving, for I will boast of your great numbers.” (An-Nasa’i)
It isn’t permissible for the man to make not having children a condition in the marriage contract because it contradicts the objectives for which the contract was legislated.
Moreover, although any similar condition is considered void, the contract is valid. On their part, Muslim jurists have stipulated that it is forbidden for the husband to threaten his wife with divorce if she wanted to get pregnant and insisted on that.
This is because she has the right to have children. Al-Imam al-Mawardi stated: “A wife has the right to have children.” (Al-Hawi al-Kabir, 11/159)
In addition, it is unjustified for both spouses to agree on not having children as ot contradicts the objectives of the marriage contract.
In principle, both should solve this matter through mutual understanding in line with the Shari`ah objective behind making a family, and that is having mercy and love between them.
However, if they were afraid of diseases, we tell them, thanks to Allah, medicine is so advanced that it can overcome such diseases.
Almighty Allah knows best.