1,485. A Condition That Requires a Prohibition
Hilchos Ishus 6:8
Let’s say that a man stipulates a condition that is possible but prohibited by the Torah. Examples would include if he told a woman that she would be consecrated to him through a dinar if she eats forbidden fats or blood but not if she doesn’t, or if he told his wife that her get is effective if she eats pork but not if doesn’t. If, after making such a condition, he put the dinar or the get in the woman’s hand, then the condition is valid. Therefore, if the woman violates the law and eats the forbidden item, then marriage or divorce is effected. This is not what is meant by a condition that contradicts the Torah since the woman has the option to comply or not, and be married or divorced as appropriate.
Hilchos Ishus 6:9
So what did the Sages mean by a condition that contradicts the Torah, which is invalid except in the case of financial matters, where it is valid? This is when a person marries, divorces, or transfers property based on a condition that grants him a right that the Torah denies him, or frees him from an obligation that the Torah requires of him. In such an instance, his condition is irrelevant and his action takes effect unconditionally. He is not relieved of any responsibility that the Torah places upon him and he does not receive any privilege that the Torah denies him.