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 is His Slave and Messenger.
This stipulation does not affect the validity of the marriage contract if all of the conditions for a valid marriage contract are fully met, the most important of which is the consent of the guardian and presence of two witnesses. For more benefit on the conditions of a valid marriage, please refer to Fatwa 83629.
Stipulations such as the one named are void because they contradict the purpose of the contract. It involves the wife renouncing a right which she is not yet entitled to, and this is renouncing a right before the entitlement or obligation thereof. If someone gives a gift that is not in his or her possession, the gift is not valid as stated by the scholars.
Therefore, the wife is entitled to her share of the inheritance upon the death of her husband. For more benefit on the conditions for the marriage contract, please refer to Fatwa 131714.
According to the Maaliki jurists, the abovementioned stipulation renders the marriage contract void before the consummation of marriage, but it is effective after the consummation of marriage. According to Ad-Dardeer's Ash-Sharh Al-Kabeer: “[As for] the stipulation of no inheritance between them [i.e. between the spouses] or no specific financial support for each month or each day…then the marriage is annulled in all of these cases before the consummation and it is effective after the consummation; and the woman is entitled to a dowry of women of the same social status as her; and the stipulation is void.”
Allaah Knows best.