The gemara on Bava Metzia 94a brings a discussion about "מתנה על מה שכתוב בתורה," about someone who makes a condition that is contrary to something that is written in the Torah.
דתניא האומר לאשה הרי את מקודשת לי על מנת שאין ליך עלי שאר כסות ועונה הרי זו מקודשת ותנאו בטל דברי ר"מ רבי יהודה אומר בדבר שבממון תנאו קיים
As it was taught in a braysa, "If someone said to his wife, 'You are married to me, on the condition that I am not obligated in שאר כסות ועונה (the obligations of a husband to his wife, e.g. food, clothing, etc.),' she is married to him, but the condition is null (and he is obligated in שאר כסות ועונה); these are the words of Rabbi Meir. Rabbi Yehudah says, (someone who makes a condition contrary to what is written in the Torah) regarding monetary issues, his condition is valid.
( translation and parenthetical explanations are mine )
So we find that Rabbi Meir holds that one can never make a valid condition (תנאי) that is contrary to something that is written in the Torah, but Rabbi Yehudah holds that these conditions can be valid, provided that they only affect monetary issues.
Are there any opinions that hold that these conditions are valid in all cases, and not just cases of monetary law?