Laws made for the preservation of public order or good morals may not be dispensed with or abrogated by any agreement. However, a person may waive or renounce what the law has established in his favor when he does not thereby injure others or affect the public interest.